ConstructorBuilder.GetToken メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Dim instance As ConstructorBuilder Dim returnValue As MethodToken returnValue = instance.GetToken
このコンストラクタの 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);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からConstructorBuilder.GetToken メソッドを検索する場合は、下記のリンクをクリックしてください。

- ConstructorBuilder.GetToken メソッドのページへのリンク