Mono Class Library: System.Type Overview | Members

System.Type.IsGenericParameter Property

Gets a value that indicates whether the current type represents a type parameter of a generic type or method.

public virtual bool IsGenericParameter { get; }

Value

true if the current object represents a type parameter of a generic type or method; otherwise false.

Remarks

This property is read-only.

Use this property to distinguish between type parameters and type arguments. When you call Type.GetGenericArguments to obtain the type arguments of a generic type, some elements of the array might be specific types (type arguments) and others might be type parameters.Type.IsGenericParameter returns false for the types and true for the type parameters.

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

Example

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

Requirements

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