MethodImplOptions Enumeration
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Namespace: System.Runtime.CompilerServicesAssembly: mscorlib (in mscorlib.dll)
[SerializableAttribute] [ComVisibleAttribute(true)] [FlagsAttribute] public enum MethodImplOptions
/** @attribute SerializableAttribute() */ /** @attribute ComVisibleAttribute(true) */ /** @attribute FlagsAttribute() */ public enum MethodImplOptions
SerializableAttribute ComVisibleAttribute(true) FlagsAttribute public enum MethodImplOptions
| Member name | Description | |
|---|---|---|
![]() | ForwardRef | Specifies that the method is declared, but its implementation is provided elsewhere. |
![]() | InternalCall | Specifies an internal call. An internal call is a call to a method implemented within the common language runtime itself. |
![]() | NoInlining | Specifies that the method can not be inlined. |
![]() | PreserveSig | Specifies that the method signature is exported exactly as declared. |
![]() | Synchronized | Specifies that the method can be executed by only one thread at a time. Static methods lock on the type, while instance methods lock on the instance. Only one thread can execute in any of the instance functions and only one thread can execute in any of a class's static functions. |
![]() | Unmanaged | Specifies that the method is implemented in unmanaged code. |
Used with MethodImplAttribute.
Specify multiple MethodImplOptions values using the bit-wise OR operator.
Note |
|---|
| Locking on the instance or on the type, as with the Synchronized flag, is not recommended for public types because code other than your own can take locks on public types and instances. This might cause deadlocks or other synchronization problems. |
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
