What Does Typeof Operator Mean?
Typeof operator, in C#, is an operator used to determine the type of the parameter passed to it. It returns the System.Type object associated with that type, which holds all the details related to the given type.
Techopedia Explains Typeof Operator
- A type that is not dynamicAn unbound type name representing a generic type with list of arguments. These are specified with appropriate commas.the keyword “void”
For example, a typeof operator can be used with StreamReader , a type defined in the .NET framework library to store it in a variable of System.Type. This type variable can then be used to query for details such as the class type (abstract or concrete), methods, etc.