System.Reflection.Emit.GenericTypeParameterBuilder.SetInterfaceConstraints Method

Sets the interfaces a type must implement in order to be substituted for the type parameter.

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public void SetInterfaceConstraints (params Type[] interfaceConstraints)

Parameters

interfaceConstraints
An array of Type objects that represent the interfaces a type must implement in order to be substituted for the type parameter.

Remarks

Interface constraints cannot be retrieved using methods of the System.Reflection.Emit.GenericTypeParameterBuilder class. Once you have created the generic type that contains the type parameter, you can use its Type object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the Type.GetGenericArguments method. For each type parameter, get the base type constraint and interface constraints by using the Type.GetGenericParameterConstraints method.

Requirements

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