Type Checking: typeof, GetType, or is?

All are different. typeof takes a type name (which you specify at compile time). GetType gets the runtime type of an instance. is returns true if an instance is in the inheritance tree. Example What about typeof(T)? Is it also resolved at compile time? Yes. T is always what the type of the expression is. … Read more