Mono Class Library: System.Type Overview | Members

System.Type.IsGenericTypeDefinition Property

Gets a value that indicates whether the current object represents the definition of a generic type, or whether one or more of its type parameters has been specified.

public virtual bool IsGenericTypeDefinition { get; }

Value

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.

Remarks

This property is read-only.

Use this property to determine whether type arguments have been specified for any of the type parameters of a generic type. If type arguments have been specified (that is, bound to the corresponding type parameters), this property returns false.

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

Note:

An open generic type can have type parameters even if types have been specified for its type parameters.

Example

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

Requirements

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