Enum GenericParameterAttributes
- Namespace
- AsmResolver.PE.DotNet.Metadata.Tables
- Assembly
- AsmResolver.PE.dll
Provides members defining all flags that can be assigned to a generic parameter.
[Flags]
public enum GenericParameterAttributes : ushortFields
- AllowByRefLike = 32
- Specifies the generic parameter can be a ref struct type. 
- Contravariant = 2
- Specifies the generic parameter is contravariant and can appear as a parameter type in method signatures. 
- Covariant = 1
- Specifies the generic parameter is covariant and can appear as the result type of a method, the type of a read-only field, a declared base type or an implemented interface. 
- DefaultConstructorConstraint = 16
- Specifies the generic parameter's type argument must have a public default constructor. 
- NonVariant = 0
- Specifies the generic parameter has no special variance rules applied to it. 
- NotNullableValueTypeConstraint = 8
- Specifies the generic parameter's type argument must be a value type and not nullable. 
- ReferenceTypeConstraint = 4
- Specifies the generic parameter's type argument must be a type reference. 
- SpecialConstraintMask = ReferenceTypeConstraint | NotNullableValueTypeConstraint | DefaultConstructorConstraint
- Provides a mask for additional constraint rules. 
- VarianceMask = Covariant | Contravariant
- Provides a mask for variance of type parameters, only applicable to generic parameters for generic interfaces and delegates