What is the difference between TypeOf and GetType?
Answer Posted / saurabh
TypeOf(): It is an operator, which used to find the type of known type at the time of compilation of the program. It depends on the class or type and cannot pass the object or instance of the class as a parameter to the TypeOf() operator.
GetType(): This is the method, using this method we can obtain the type of the object or the type of instance of the class. To call this method we need an object or an instance of a class.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Are c# objects passed by reference?
What is difference between constants and readonly in c#?
When can a derived class override a base class member?
What are the differences between system.string and system.text.stringbuilder classes?
What is nullable types in c#?
Explain dataadapter.update method in .net?
Is it good to use var in c#?
How to override a function in c#?
Define delay signing?
What is the purpose of static?
Explain acid rule of thumb for transactions in c#.
Why it's said that writing into .NET Application Configuration Files is a Bad Idea?
Is c sharp free?
What is string pool in c#?
Can we assign null value to integer?