ModuleBuilder.GetConstructorToken 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳用於識別該模組中指定建構子的標記。
多載
| 名稱 | Description |
|---|---|
| GetConstructorToken(ConstructorInfo) |
回傳用於識別該模組中指定建構子的標記。 |
| GetConstructorToken(ConstructorInfo, IEnumerable<Type>) |
回傳用於識別此模組中具有指定屬性與參數類型的建構子的標記。 |
GetConstructorToken(ConstructorInfo)
回傳用於識別該模組中指定建構子的標記。
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
參數
- con
- ConstructorInfo
建造者要拿代幣。
傳回
用於識別此模組中指定建構子的標記。
- 屬性
例外狀況
con 是 null。
適用於
GetConstructorToken(ConstructorInfo, IEnumerable<Type>)
回傳用於識別此模組中具有指定屬性與參數類型的建構子的標記。
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
參數
- constructor
- ConstructorInfo
建造者要拿代幣。
- optionalParameterTypes
- IEnumerable<Type>
這是建構子可選參數類型集合。
傳回
用於識別此模組中指定建構子的標記。
例外狀況
constructor 是 null。