Open sandboxFocus

Method OfExactSignature

OfExactSignature(IConstructorCollection, IReadOnlyList<IType>, IReadOnlyList<RefKind>?)

Gets a constructor that exactly matches the specified signature given using the System.Reflection API.

Declaration
public static IConstructor? OfExactSignature(this IConstructorCollection constructors, IReadOnlyList<IType> parameterTypes, IReadOnlyList<RefKind>? refKinds = null)
Parameters
Type Name Description
IConstructorCollection constructors

A collection of constructors.

IReadOnlyList<IType> parameterTypes

List of parameter types.

IReadOnlyList<RefKind> refKinds

List of parameter reference kinds, or null if all parameters should be by-value.

Returns
Type Description
IConstructor

A IConstructor that matches the given signature.

OfExactSignature(IConstructorCollection, IConstructor)

Gets a constructor that exactly matches the signature of the specified method.

Declaration
public static IConstructor? OfExactSignature(this IConstructorCollection constructors, IConstructor signatureTemplate)
Parameters
Type Name Description
IConstructorCollection constructors

A collection of constructors.

IConstructor signatureTemplate

Constructor signature of which to should be considered.

Returns
Type Description
IConstructor

A IConstructor that matches the given signature.