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
What is difference between array and collection?
Why do we need singleton pattern in c#?
Which sorting algorithm is best?
To whom a method is accesssed if it is marked as protected internal ?
Is c# slower than java?
Can we inherit static class in c#?
Is vs as c#?
Is string nullable c#?
Where do I put dll files?
What is difference between float and decimal?
What is delegate in c#?
What do you mean by “finalize” and “finally” methods in c#?
What is the solution if you need to manipulate sets of items?
How many types of collections are there in c#?
Is overriding of a function possible in the same class?