Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MethodBase.GetMethodImplementationFlags Method

When overridden in a derived class, returns the MethodImplAttributes flags.

[Visual Basic]
Public MustOverride Function GetMethodImplementationFlags() As _
   MethodImplAttributes
[C#]
public abstract MethodImplAttributes GetMethodImplementationFlags();
[C++]
public: virtual MethodImplAttributes GetMethodImplementationFlags()
   = 0;
[JScript]
public abstract function GetMethodImplementationFlags() :
   MethodImplAttributes;

Return Value

The MethodImplAttributes flags.

Example

[Visual Basic] 
' 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())

[C#] 
// 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);

[C++] 
// 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(S"Module Name : {0}", myModule->Name);
// Get the 'MethodToken' that represents the token for this constructor.
MethodToken myMethodToken = myConstructorBuilder->GetToken();
Console::WriteLine(S"Constructor Token is : {0}", __box(myMethodToken.Token));
// Get the method implementation flags for this constructor.
MethodImplAttributes myMethodImplAttributes = myConstructorBuilder->GetMethodImplementationFlags();
Console::WriteLine(S"MethodImplAttributes : {0}", __box(myMethodImplAttributes));

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

MethodBase Class | MethodBase Members | System.Reflection Namespace | MethodImplAttributes

Show:
© 2017 Microsoft