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 / brijen.patel

TypeOf and GetType Produce the same information but the
difference is where they get theis information from;
typeOf is used to get the type based on a class, that means
if you use typeOf with object, it will gives you error. you
must pass class as parameter. Whereas GetType is used to
get the type based on as object (an instance of a class)
means GetType needs parameter of object rather than class name.

Is This Answer Correct ?    18 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If a child class instance is created, which class constructor is called first - base class or child class?

919


Which are the loop types available in c#?

925


Explain the process of inheriting a class into another class?

977


What is delegate in c# interview questions?

975


What is the benefit of using interface in c#?

986


What is difference between arraylist and list in c#?

874


What is the use of tryparse in c#?

905


Is type nullable c#?

919


What is Wrapper class in dot net?

1049


How many types of constructors are there in c#?

956


Is static thread safe?

858


How do I do implement a trace and assert?

965


What is the use of xmlserializer?

855


In how many ways you can overload a method?

1049


Is c# easier than javascript?

973