ConstructorBuilder.GetToken メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ConstructorBuilder.GetToken メソッドの意味・解説 

ConstructorBuilder.GetToken メソッド

このコンストラクタトークンを表す MethodToken を返します

名前空間: System.Reflection.Emit
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function GetToken As
 MethodToken
Dim instance As ConstructorBuilder
Dim returnValue As MethodToken

returnValue = instance.GetToken
public MethodToken GetToken ()
public:
MethodToken GetToken ()
public MethodToken GetToken ()
public function GetToken () : MethodToken

戻り値
このコンストラクタMethodToken返します

解説解説

GetToken使用方法については、次のコード例参照してください

' Define a constructor of the dynamic class.
Dim myConstructorBuilder As ConstructorBuilder
 = _ 
    myTypeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard,
 _ 
                                    myConstructorArgs)
' Get a reference to the module that contains this constructor.
Dim myModule As [Module] = myConstructorBuilder.GetModule()
Console.WriteLine("Module Name : " + myModule.Name)
' Get the 'MethodToken' that represents the token for this constructor.
Dim myMethodToken As MethodToken = myConstructorBuilder.GetToken()
Console.WriteLine("Constructor Token is : " + myMethodToken.Token.ToString())
' Get the method implementation flags for this constructor.
Dim myMethodImplAttributes As MethodImplAttributes
 = _
    myConstructorBuilder.GetMethodImplementationFlags()
Console.WriteLine("MethodImplAttributes : " + myMethodImplAttributes.ToString())
// Define a constructor of the dynamic class.
ConstructorBuilder myConstructorBuilder = myTypeBuilder.DefineConstructor(
   MethodAttributes.Public, CallingConventions.Standard, myConstructorArgs);
// Get a reference to the module that contains this constructor.
Module myModule = myConstructorBuilder.GetModule();
Console.WriteLine("Module Name : " + myModule.Name);
// Get the 'MethodToken' that represents the token for this constructor.
MethodToken myMethodToken = myConstructorBuilder.GetToken();
Console.WriteLine("Constructor Token is : " + myMethodToken.Token);
// Get the method implementation flags for this constructor.
MethodImplAttributes myMethodImplAttributes = myConstructorBuilder.GetMethodImplementationFlags();
Console.WriteLine("MethodImplAttributes : "  + myMethodImplAttributes);
// Define a constructor of the dynamic class.
ConstructorBuilder^ myConstructorBuilder = myTypeBuilder->DefineConstructor(
   MethodAttributes::Public, CallingConventions::Standard, myConstructorArgs );
// Get a reference to the module that contains this constructor.
Module^ myModule = myConstructorBuilder->GetModule();
Console::WriteLine( "Module Name : {0}", myModule->Name );
// Get the 'MethodToken' that represents the token for this constructor.
MethodToken myMethodToken = myConstructorBuilder->GetToken();
Console::WriteLine( "Constructor Token is : {0}", myMethodToken.Token );
// Get the method implementation flags for this constructor.
MethodImplAttributes myMethodImplAttributes = myConstructorBuilder->GetMethodImplementationFlags();
Console::WriteLine( "MethodImplAttributes : {0}", myMethodImplAttributes
 );
// Define a constructor of the dynamic class.
ConstructorBuilder myConstructorBuilder =
    myTypeBuilder.DefineConstructor(MethodAttributes.Public,
    CallingConventions.Standard, myConstructorArgs);

// Get a reference to the module that contains this constructor.
Module myModule = myConstructorBuilder.GetModule();
Console.WriteLine("Module Name : " + myModule.get_Name());

// Get the 'MethodToken' that represents the token for this constructor.
MethodToken myMethodToken = myConstructorBuilder.GetToken();
Console.WriteLine("Constructor Token is : " + myMethodToken.get_Token());

// Get the method implementation flags for this constructor.
MethodImplAttributes myMethodImplAttributes =
    myConstructorBuilder.GetMethodImplementationFlags();
Console.WriteLine("MethodImplAttributes : " + myMethodImplAttributes);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ConstructorBuilder クラス
ConstructorBuilder メンバ
System.Reflection.Emit 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からConstructorBuilder.GetToken メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からConstructorBuilder.GetToken メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からConstructorBuilder.GetToken メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ConstructorBuilder.GetToken メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ConstructorBuilder.GetToken メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS