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 the difference between firstordefault and singleordefault?
What is extended class in c#?
Hi to all..I have to create an intranet application on C#.NET windows Application so please please let can you people help me as iam new in .NET and if u have any samples or website address from where i can get sample please let know.
What is foreach loop in c#?
Why do we need dependency injection in c#?
Can a constructor be static in c#?
Why it's said that writing into .NET Application Configuration Files is a Bad Idea?
What are callback methods in c#?
Which types of inheritances does c# support?
Is as operator in c#?
What is clr namespace?
What are static and dynamic variables?
What are the advantages of generics in c#?
What is a long in c#?
Is a char?