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

Should I use double or float?

908


What's the difference between abstraction and encapsulation?

905


What is difference between the "throw" and "throw ex" in .net?

966


what is main function of alternate teamplate of datalist?

2357


What is difference between overloading and short circuiting?

992


What are the differences between a class and a struct?

1101


What is the purpose of namespace in c#?

874


Is it possible to have different access modifiers on the get/set methods of a property?

1032


When should I throw an exception?

1016


What are examples of desktop applications?

971


What are primitive data types in c#?

944


What is the difference between convert and parse in c#?

940


Can you use all access modifiers for all types?

976


List some Advantages of switch-case over if else?

933


What is toint32 c#?

1048