System.Type.GenericParameterAttributes Property

Gets a combination of System.Reflection.GenericParameterAttributes flags that describe the covariance and special constraints of the current generic type parameter.

Syntax

public virtual System.Reflection.GenericParameterAttributes GenericParameterAttributes { get; }

Value

A System.Reflection.GenericParameterAttributes value that describes the variance and special constraints of the current generic type parameter.

Exceptions

TypeReason
InvalidOperationExceptionThe current Type object is not a generic type parameter. That is, the Type.IsGenericParameter property returns false.

Remarks

The value of this property contains flags that describe whether the current generic type parameter is covariant, and flags that describe any special constraints. Use the System.Reflection.GenericParameterAttributes.VarianceMask value to select the covariance flags, and use the System.Reflection.GenericParameterAttributes.SpecialConstraintMask value to select the constraint flags.

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

Requirements

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