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
What is a template class?
Can you declare a class or a struct as constant?
What is the main usage of keyword “virtual†? How does it work for a method or property?
what is collections in .net? why we use?
explain the nature of the assembly work?
What is visual c# net?
Distinguish between finally and finalize blocks?
What is difference between c and c sharp?
What is yield return in c#?
Define satellite assembly in c#?
Is predicate a functional interface?
What is concrete class in c# with example?
Define satellite Assembly?
Is string a primitive data type in c#?
What are regular expressions? Search a string using regular expressions?