Mono Class Library: System.Type Overview | Members

System.Type.GenericParameterAttributes Property

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

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

This property is read-only.

The value of this property contains flags that describe whether the current generic type parameter is variant, and flags that describe any special constraints. Use GenericParameterAttributes.VarianceMask to select the variance flags, and GenericParameterAttributes.SpecialConstraintMask to select the constraint flags. Use Reflection.GetGenericParameterConstraints to get the type constraints.

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

Requirements

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