[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Specifies flags for the attributes of a method implementation.
Assembly: mscorlib (in mscorlib.dll)
|Specifies that the method should be inlined wherever possible.|
|Specifies flags about code type.|
|Specifies that the method is not defined.|
|Specifies that the method implementation is in Microsoft intermediate language (MSIL).|
|Specifies an internal call.|
|Specifies that the method implementation is managed.|
|Specifies whether the code is managed or unmanaged.|
|Specifies a range check value.|
|Specifies that the method implementation is native.|
|Specifies that the method cannot be inlined.|
|Specifies that the method is not optimized by the just-in-time (JIT) compiler when debugging possible code generation problems.|
|Specifies that the method implementation is in optimized intermediate language (OPTIL).|
|Specifies that the method signature is exported exactly as declared.|
|Specifies that the method implementation is provided by the runtime.|
|Specifies that the method is single-threaded through the body. Static methods (Shared methods in Visual Basic) lock on the type, whereas instance methods lock on the instance. You can also use the C# lock statement or the Visual Basic Lock function for this purpose.|
|Specifies that the method implementation is unmanaged.|
The attributes are combined using the bitwise OR operation.
Code implementation masks:
Implementation information and interop masks:
Locking on the instance or on the type, for example, by using the 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.