MethodImplAttributes Enumeration
Specifies the attributes of a method implementation.
public enum MethodImplAttributes
: short
{ IL = 0, Native = 1, Optical = 2, InternalCall = 4194304, Synchronized = 1048576, NoInlining = 8, ForwardRef = 16, PreserveSig = 128, AggressiveInlining = 256, AggressiveOptimization = 512, InternalBestFit = 65536, SecurityOptimized = 131072, ManagedMask = 4, Managed = 0, UnmanagedMask = 0, Unmanaged = 1 }
Remarks
The MethodImplAttributes
enumeration is used by the
MethodBase.GetMethodImplementationFlags
method to retrieve
the implementation attributes of a method. These attributes describe
how a method is implemented, such as whether it is written in IL,
native code, or is an internal call.
IL
The method is implemented in Microsoft intermediate language (MSIL).
Native
The method is implemented in native code.
Optical
The method is implemented using a runtime specific intermediate language.
InternalCall
The method is an internal call, meaning it is implemented within the CLR.
Synchronized
The method is synchronized. Only one thread can execute the method at a time.
NoInlining
The method should not be inlined by the Just-In-Time (JIT) compiler.
ForwardRef
The method is defined elsewhere; the definition is not included in this module.
PreserveSig
The method's metadata signature is preserved exactly as defined.
AggressiveInlining
The method is a candidate for aggressive inlining by the JIT compiler.
AggressiveOptimization
The method is a candidate for aggressive optimization by the JIT compiler.
InternalBestFit
Reserved for runtime use. Indicates best-fit mapping.
SecurityOptimized
The method has been optimized for security.
ManagedMask
Mask to extract managed code attributes.
Managed
The method is managed code.
UnmanagedMask
Mask to extract unmanaged code attributes.
Unmanaged
The method is unmanaged code.