다음을 통해 공유


MethodBase.GetMethodImplementationFlags 메서드

파생 클래스에서 재정의되면 MethodImplAttributes 플래그를 반환합니다.

네임스페이스: System.Reflection
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
Public MustOverride Function GetMethodImplementationFlags As MethodImplAttributes
‘사용 방법
Dim instance As MethodBase
Dim returnValue As MethodImplAttributes

returnValue = instance.GetMethodImplementationFlags
public abstract MethodImplAttributes GetMethodImplementationFlags ()
public:
virtual MethodImplAttributes GetMethodImplementationFlags () abstract
public abstract MethodImplAttributes GetMethodImplementationFlags ()
public abstract function GetMethodImplementationFlags () : MethodImplAttributes

반환 값

MethodImplAttributes 플래그입니다.

예제

' 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);

.NET Framework 보안

플랫폼

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에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

MethodBase 클래스
MethodBase 멤버
System.Reflection 네임스페이스
MethodImplAttributes