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 uint16?
What is a Assembly?
what is the meaning of Object lifetime in OOPS
How to properly clean up excel interop objects?
Can we use "this" command within a static method?
Is c# a technology?
What is session and cookies in c#?
What is the difference between null and string empty in c#?
What is a console?
What is datareader c#?
What is a derived class in c#?
what are the different ways a method can be overloaded?
What is a dll in c#?
Can delegates be used as callbacks?
What are properties in C#?