MethodImplOptions Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Defines the details of how a method is implemented.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<FlagsAttribute> _
<ComVisibleAttribute(True)> _
Public Enumeration MethodImplOptions
[FlagsAttribute]
[ComVisibleAttribute(true)]
public enum MethodImplOptions

Members

Member name Description
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Unmanaged Specifies that the method is implemented in unmanaged code.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 ForwardRef Specifies that the method is declared, but its implementation is provided elsewhere.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 PreserveSig Specifies that the method signature is exported exactly as declared.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 InternalCall Specifies an internal call. An internal call is a call to a method implemented within the common language runtime itself.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Synchronized Specifies that the method can be executed by only one thread at a time.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 NoInlining Specifies that the method can not be inlined.
AggressiveInlining The method should be inlined if possible.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 NoOptimization Specifies that the method is not optimized by the just-in-time (JIT) compiler.

Remarks

Version Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 Specifying the Synchronized option for the MethodImplAttribute constructor is not supported and will not result in synchronized behavior.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.