What is the difference between TypeOf and GetType?
Answer Posted / chirag
GetType is a call that is made at runtime on an instance of
an object.
typeof() is resolved to a call at runtime, but loads the
type from the token
for the type. They probably resolve to the same call, it's
just that
GetType requires an instance. If I didn't need the instance,
I would use
typeof.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can abstract class have constructor?
What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
what is a constructor? What is a destructor?
What is xaml in c#?
Difference between value and reference type.
What is the different types of private assembly and shared assembly?
Why dictionary is used in c#?
What is dynamic in c#?
Define mutex in C#?
What is a multicast c# delegate?
Which controls do not have events?
What is iqueryable and ienumerable in c#?
What is datarelation c#?
Does main have to be static c#?
What is cache memory in c#?