ModuleBuilder.GetConstructorToken Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per