<PackageReference Include="System.Reflection.Emit" Version="4.6.0-preview6.19264.9" />

GenericTypeParameterBuilder

public sealed class GenericTypeParameterBuilder : Type
Defines and creates generic type parameters for dynamically defined generic types and methods. This class cannot be inherited.
public void SetBaseTypeConstraint(Type baseTypeConstraint)

Sets the base type that a type must inherit in order to be substituted for the type parameter.

public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)

Sets a custom attribute using a specified custom attribute blob.

public void SetCustomAttribute(CustomAttributeBuilder customBuilder)

Set a custom attribute using a custom attribute builder.

public void SetGenericParameterAttributes(GenericParameterAttributes genericParameterAttributes)

Sets the variance characteristics and special constraints of the generic parameter, such as the parameterless constructor constraint.

public void SetInterfaceConstraints(Type[] interfaceConstraints)

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