Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight 3
 MethodImplAttributes Enumeration

  Switch on low bandwidth view
.NET Framework Class Library for Silverlight
MethodImplAttributes Enumeration

Specifies flags for the attributes of a method implementation.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
<ComVisibleAttribute(True)> _
Public Enumeration MethodImplAttributes
Visual Basic (Usage)
Dim instance As MethodImplAttributes
C#
[ComVisibleAttribute(true)]
public enum MethodImplAttributes
Member nameDescription
CodeTypeMaskSpecifies flags about code type.
ILSpecifies that the method implementation is in Microsoft intermediate language (MSIL).
NativeSpecifies that the method implementation is native.
OPTILSpecifies that the method implementation is in Optimized Intermediate Language (OPTIL).
RuntimeSpecifies that the method implementation is provided by the runtime.
ManagedMaskSpecifies whether the code is managed or unmanaged.
UnmanagedSpecifies that the method implementation is unmanaged.
ManagedSpecifies that the method implementation is managed.
ForwardRefSpecifies that the method is not defined.
PreserveSigSpecifies that the method signature is exported exactly as declared.
InternalCallSpecifies an internal call.
SynchronizedSpecifies 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.
NoInliningSpecifies that the method cannot be inlined.
NoOptimizationSpecifies that the method is not optimized by the just-in-time (JIT) compiler when debugging possible code generation problems.
MaxMethodImplValSpecifies a range check value.

The attributes are combined using the bitwise OR operation.

Code implementation masks:

  • CodeTypeMask

  • IL

  • Native

  • OPTIL

  • Runtime

Managed masks:

  • ManagedMask

  • Unmanaged

  • Managed

Implementation information and interop masks:

  • ForwardRef

  • PreserveSig

  • InternalCall

  • Synchronized

  • NoInlining

  • MaxMethodImplVal

NoteNote:

Locking on the instance or on the type, for example, by using 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.

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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker