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
What is difference between dictionary and hashtable?
Do events have return type c#?
Are objects passed by reference in c#?
Is stringbuilder thread safe c#?
What is the reason behind the invention of c#?
Is c# dictionary a hash table?
What are jump statements in c#?
Can destructors have access modifiers?
What is difference between gridview and form view?
What is the difference between function and method in c#?
How is a string immutable?
if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.
What is the difference between internal and protected in c#?
What is the full form of GAC? Explain its uses?
Where do I put dll files?