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
Is system a class in c#?
What is the difference between int16 and int32 in c#?
What is difference between private and static constructor?
What is Fragmentation and its Types?
Why do we need delegates in c#?
What is difference between managed and unmanaged code?
Explain about Error handling and how this is done
Explain the difference between directcast and ctype.
What is the role of the datareader class in ado.net connections?
What is razor view in c#?
What is an inheritance ?Give an example in which inheritance is used?
What is ienumerable t in c#?
How do you inherit a class into other class in c#?
What is sql transaction in c#?
Define the term immutable ?