System.Type.IsGenericTypeDefinition Property

Gets a value indicating whether the current Type represents a generic type definition, from which other generic types can be constructed.


public virtual bool IsGenericTypeDefinition { get; }


true if the current object represents the definition of a generic type, none of whose type parameters have been bound to specific types; otherwise false.


A generic type definition is a template from which other types can be constructed. For example, from the generic type definition G<T> (expressed in C# syntax; G(Of T) in Visual Basic or generic <typename T> ref class G in C++) you can construct and instantiate the type G<int> (G(Of Integer) in Visual Basic), by calling the Type.MakeGenericType(Type[]) method with a generic argument list containing the int type. Given a Type object representing this constructed type, the Type.GetGenericTypeDefinition method gets the generic type definition back again.

Use the Type.IsGenericTypeDefinition property to determine whether you can create new types from the current type. If the Type.IsGenericTypeDefinition property returns true, you can call the Type.MakeGenericType(Type[]) method to create new generic types.

For a list of the invariant conditions for terms used in generic reflection, see the Type.IsGenericType property remarks.


For an example of using this method, see the example for System.Type.MakeGenericType..


Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions:,
Since: .NET 2.0