What is the difference between typeof(foo) and myFoo.GetType()?
Answer Posted / nidhi
Operator typeof(foo) is used to obtain the System.Type
object for a type at compile time.
myFoo.GetType() is used to obtain the exact run time type of
an object. This method uses reflection.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the right type to use for boolean values in c? Is there a standard type?
How the c program is executed?
Explain what happens if you free a pointer twice?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
What does the format %10.2 mean when included in a printf statement?
What is wild pointer in c with example?
Can we use visual studio for c?
Why static is used in c?
Explain what are the different file extensions involved when programming in c?
What is a node in c?
Is swift based on c?
please explain every phase in the "SDLC" in the dotnet.
What is the use of static variable in c?
What is a struct c#?
Is there a way to compare two structure variables?