Returns an array of Type objects that represent the constraints on the current generic type parameter.
Assembly: mscorlib (in mscorlib.dll)
Each constraint on a generic type parameter is expressed as a Type object. Use the IsClass property to determine whether a constraint is the base class constraint; if the property returns false, the constraint is an interface constraint. If a type parameter has no class constraint and no interface constraints, an empty array is returned.
For a list of the invariant conditions for terms used in generic reflection, see the IsGenericType property remarks.
The following code example defines a generic type Test with two type parameters that have different constraints. When the program executes, the constraints are examined using the GenericParameterAttributes property and the method.