MethodImplOptions Enumeration
Collapse the table of content
Expand the table of content

MethodImplOptions Enumeration

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

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)

public enum MethodImplOptions

Member nameDescription
AggressiveInliningThe method should be inlined if possible.
ForwardRefSpecifies that the method is declared, but its implementation is provided elsewhere.
InternalCallSpecifies an internal call. An internal call is a call to a method implemented within the common language runtime itself.
NoInliningSpecifies that the method can not be inlined. Inlining is an optimization by which a method call is replaced with the method body.
NoOptimizationSpecifies that the method is not optimized by the just-in-time (JIT) compiler.
PreserveSigSpecifies that the method signature is exported exactly as declared.
SynchronizedSpecifies that the method can be executed by only one thread at a time.
UnmanagedSpecifies that the method is implemented in unmanaged code.

Version Notes

Windows Phone

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2017 Microsoft