See Also: Type Members
The Type class is abstract, as is the System.Reflection.MemberInfo class and its subclasses System.Reflection.FieldInfo, System.Reflection.PropertyInfo, System.Reflection.MethodBase, and System.Reflection.EventInfo. System.Reflection.ConstructorInfo and System.Reflection.MethodInfo are subclasses of System.Reflection.MethodBase. The runtime provides non-public implementations of these classes.
A conforming CLI program which is written to run on only the Kernel profile cannot subclass Type.
A Type object that represents a type is unique; that is, two Type object references refer to the same object if and only if they represent the same type. This allows for comparison of Type objects using reference equality.
An instance of Type can represent any one of the following types:
The following table shows what members of a base class are returned by the methods that return members of types, such as Type.GetConstructor(System.Reflection.BindingFlags, System.Reflection.Binder, System.Reflection.CallingConventions, Type[], System.Reflection.ParameterModifier[]) and Type.GetMethod(string, System.Reflection.BindingFlags, System.Reflection.Binder, System.Reflection.CallingConventions, Type[], System.Reflection.ParameterModifier[]).
| Member Type | Static | Non-Static |
|---|---|---|
| Constructor | No | No |
| Field | No | Yes. A field is always hide-by-name-and-signature. |
| Event | Not applicable | The common type system rule is that the inheritance of an event is the same as that of the accessors that implement the event. Reflection treats events as hide-by-name-and-signature. |
| Method | No | Yes. A method (both virtual and non-virtual) can be hide-by-name or hide-by-name-and-signature. |
| Nested Type | No | No |
| Property | Not applicable | The common type system rule is that the inheritance is the same as that of the accessors that implement the property. Reflection treats properties as hide-by-name-and-signature. |
For reflection, properties and events are hide-by-name-and-signature. If a property has both a get and a set accessor in the base class, but the derived class has only a get accessor, the derived class property hides the base class property, and the setter on the base class will not be accessible.
The description of Type.IsGenericType contains definitions for some important terms.