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 are the 4 pillars of any object oriented programming language?
To catch any possible exception What is the C# syntax written ?
How do you pronounce c#?
What are events in C#?
What is xml serialization in c#?
what is inheritance and an example in vb.net and c# of when you might use it?
What is difference between ilist and list in c#?
Why do we Need of static class in c#?
Why do canadians say zed?
Is java better than c sharp?
What is cts, clr?
Can class inherit from struct c#?
What does type safe mean in c#?
How many types of methods are there in c#?
What is datagrid c#?