ModuleBuilder.GetConstructorToken Method

Definition

Returns the token used to identify the specified constructor within this module.

Overloads

GetConstructorToken(ConstructorInfo)

Returns the token used to identify the specified constructor within this module.

GetConstructorToken(ConstructorInfo, IEnumerable<Type>)

Returns the token used to identify the constructor that has the specified attributes and parameter types within this module.

GetConstructorToken(ConstructorInfo)

Returns the token used to identify the specified constructor within this module.

public:
 System::Reflection::Emit::MethodToken GetConstructorToken(System::Reflection::ConstructorInfo ^ con);
public System.Reflection.Emit.MethodToken GetConstructorToken (System.Reflection.ConstructorInfo con);
[System.Runtime.InteropServices.ComVisible(true)]
public System.Reflection.Emit.MethodToken GetConstructorToken (System.Reflection.ConstructorInfo con);
member this.GetConstructorToken : System.Reflection.ConstructorInfo -> System.Reflection.Emit.MethodToken
[<System.Runtime.InteropServices.ComVisible(true)>]
member this.GetConstructorToken : System.Reflection.ConstructorInfo -> System.Reflection.Emit.MethodToken
Public Function GetConstructorToken (con As ConstructorInfo) As MethodToken

Parameters

con
ConstructorInfo

The constructor to get a token for.

Returns

The token used to identify the specified constructor within this module.

Attributes

Exceptions

con is null.

Applies to

GetConstructorToken(ConstructorInfo, IEnumerable<Type>)

Returns the token used to identify the constructor that has the specified attributes and parameter types within this module.

public:
 System::Reflection::Emit::MethodToken GetConstructorToken(System::Reflection::ConstructorInfo ^ constructor, System::Collections::Generic::IEnumerable<Type ^> ^ optionalParameterTypes);
public System.Reflection.Emit.MethodToken GetConstructorToken (System.Reflection.ConstructorInfo constructor, System.Collections.Generic.IEnumerable<Type> optionalParameterTypes);
member this.GetConstructorToken : System.Reflection.ConstructorInfo * seq<Type> -> System.Reflection.Emit.MethodToken
Public Function GetConstructorToken (constructor As ConstructorInfo, optionalParameterTypes As IEnumerable(Of Type)) As MethodToken

Parameters

constructor
ConstructorInfo

The constructor to get a token for.

optionalParameterTypes
IEnumerable<Type>

A collection of the types of the optional parameters to the constructor.

Returns

The token used to identify the specified constructor within this module.

Exceptions

constructor is null.

Applies to