Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between TypeOf and GetType?

Answer Posted / chirag

GetType is a call that is made at runtime on an instance of
an object.
typeof() is resolved to a call at runtime, but loads the
type from the token
for the type. They probably resolve to the same call, it's
just that
GetType requires an instance. If I didn't need the instance,
I would use
typeof.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What I can do with c#?

991


What is static classes?

1005


What is dataset and dataadapter in c#?

988


What are extender provider components? Explain how to use an extender provider in the project.

943


Give an example of a directcast.

985


What exception can an overridden method throw in comparison with the method it is overriding?

915


What is inumerable?

1114


How to get the sum of last 3 items in a list using lambda expressions?

968


what will be the output of the given below coding. using System; public class Exercise { static void OddNumbers(int a) { if (a >= 1) { Console.Write("{0}, ", a); a -= 2; OddNumbers(a); } } public static int Main() { const int Number = 9; Console.WriteLine("Odd Numbers"); OddNumbers(Number); Console.WriteLine(); return 0; } }

4437


What is the main usage of keyword “virtual” ? How does it work for a method or property?

960


How can we sort the elements of the array in descending order?

994


What is serialization in c#?

948


Give an example to show for hiding base class methods?

895


Describe the process of “exception handling implementation” in c#?

1021


Explain the mechanism of VB.NET/C# achieve polymorphism?

1046