What is the difference between TypeOf and GetType?
Answer Posted / brijen.patel
TypeOf and GetType Produce the same information but the
difference is where they get theis information from;
typeOf is used to get the type based on a class, that means
if you use typeOf with object, it will gives you error. you
must pass class as parameter. Whereas GetType is used to
get the type based on as object (an instance of a class)
means GetType needs parameter of object rather than class name.
| Is This Answer Correct ? | 18 Yes | 0 No |
Post New Answer View All Answers
What is the difference between an integer and int?
What does dbml stand for?
Explain the difference between the debug class and trace class?
Can you change the value of a constant filed after its declaration?
Distinguish between the Debug class and Trace class with its functionality?
Is dictionary reference type c#?
List the two important objects of ado.net and also list the namespaces that are commonly used in ado.net to aid in connection to a database.
Explain code compilation in c#.
How do switch statements work?
How does bubble sort work?
Explain 'structure padding'?
What is an escape sequence in c#?
Why do we need interfaces in c#?
What does static mean in c sharp?
Is it possible to have a static indexer in c#?