Returns a Type object that represents a generic type from which the current type can be constructed.
A Type object representing a generic type from which the current type can be constructed.
Type Reason InvalidOperationException The current type is not a generic type. That is, Type.HasGenericArguments returns false.
If two constructed types are created from the same generic type definition, the Type.GetGenericTypeDefinition method returns the same Type object for both types.
If you call Type.GetGenericTypeDefinition on a Type object that already represents a generic type definition, it returns the current Type.
Note: An array type whose element type is a generic type is not itself generic. Use Type.IsGenericType to determine whether a type is generic before calling Type.GetGenericTypeDefinition.For a list of the invariant conditions for terms used in generic reflection, see the Type.IsGenericType property description.
For an example of using this method, see the example for Type.MakeGenericType.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0