In This Article

ITypeParameter Interface

Provides the base requirements of a generic type parameter.

public interface ITypeParameter : ITypeDefinition, IReflectionDefinition, ITypeReference

Properties

DeclaringMember

Gets the type member that declares the current type parameter.

ITypeMemberDefinition DeclaringMember { get; }

Property Value

ITypeMemberDefinition:

An ITypeMemberDefinition object representing the type member that declares the current type parameter.

HasDefaultConstructorConstraint

Gets whether a public parameterless constructor constraint is present.

bool HasDefaultConstructorConstraint { get; }

Property Value

bool:

true if a public parameterless constructor constraint is present; otherwise, false.

HasNotNullableValueTypeConstraint

Gets whether a non-nullable value type constraint is present.

bool HasNotNullableValueTypeConstraint { get; }

Property Value

bool:

true if a non-nullable value type constraint is present; otherwise, false.

HasReferenceTypeConstraint

Gets whether a reference type constraint is present.

bool HasReferenceTypeConstraint { get; }

Property Value

bool:

true if a reference type constraint is present; otherwise, false.

IsContravariant

Gets whether the type can be less derived than what is defined (in).

bool IsContravariant { get; }

Property Value

bool:

true if the type can be less derived than what is defined; otherwise, false.

IsCovariant

Gets whether the type can be more derived than what is defined (out).

bool IsCovariant { get; }

Property Value

bool:

true if the type can be more derived than what is defined; otherwise, false.

TypeParameterPosition

Gets the zero-based index of the generic type parameter.

int TypeParameterPosition { get; }

Property Value

int:

The zero-based index of the generic type parameter.

Inherited Members