+ 2
Difference between GetType() and typeof()
Why provide Microsoft two different methods for single work
2 Respuestas
0
First of all, Typeof is not a function. It is a keyword which is used to define the type.
While GetType() is used to get the datatype of a particular object. It can be used only on the object of a class.
For further learning, you can refer the following link.
https://www.c-sharpcorner.com/blogs/difference-between-typeof-and-gettype-methods1