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
Is namespace a class?
How is a string immutable?
How many types of collections are there in c#?
Does a loop recorder have to be removed?
What are mutable and immutable types in c#?
What is the difference between new and override in c#?
What is system console writeline in c#?
Is a games console a computer?
write a program to find the biggest palindrome in the given string
Define delegate in c#?
What is the difference between dictionary and hashtable in c#?
What is the role of the datareader class in ado.net connections?
What is array and its types in c#?
What is the diff between the System.Array.CopyTo() and System.Array.Clone()?
What is transparent caching with aop ?