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
If a child class instance is created, which class constructor is called first - base class or child class?
Which are the loop types available in c#?
Explain the process of inheriting a class into another class?
What is delegate in c# interview questions?
What is the benefit of using interface in c#?
What is difference between arraylist and list in c#?
What is the use of tryparse in c#?
Is type nullable c#?
What is Wrapper class in dot net?
How many types of constructors are there in c#?
Is static thread safe?
How do I do implement a trace and assert?
What is the use of xmlserializer?
In how many ways you can overload a method?
Is c# easier than javascript?