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


Please Help Members By Posting Answers For Below Questions

Which is the best language for desktop application?

549


Explain the Abstract class in c#.net

629


What are data types examples?

571


Is null == null c#?

558


Differentiate between static class and singleton instance?

601






Compare and contrast between the System.Array.CopyTo() and Clone()?

629


What is the difference between method and function in c#?

540


what is the Difference between the public and private ?

598


What does console writeline do?

564


What is value c#?

541


Do loops in c#?

573


What is argument in c#?

603


Explain “static” keyword in c#?

554


What is the difference between delegates and events in c#?

511


How many types of namespaces available in version4?

597