mscorlib(4.0.0.0) API with additions
MethodImplAttribute.cs
1 using System.Reflection;
3 
5 {
8  [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false)]
9  [ComVisible(true)]
10  [__DynamicallyInvokable]
11  public sealed class MethodImplAttribute : Attribute
12  {
13  internal MethodImplOptions _val;
14 
17 
20  [__DynamicallyInvokable]
22  {
23  [__DynamicallyInvokable]
24  get
25  {
26  return _val;
27  }
28  }
29 
30  internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)
31  {
32  MethodImplOptions methodImplOptions = MethodImplOptions.Unmanaged | MethodImplOptions.ForwardRef | MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall | MethodImplOptions.Synchronized | MethodImplOptions.NoInlining | MethodImplOptions.AggressiveInlining | MethodImplOptions.NoOptimization;
33  _val = (MethodImplOptions)((int)methodImplAttributes & (int)methodImplOptions);
34  }
35 
38  [__DynamicallyInvokable]
39  public MethodImplAttribute(MethodImplOptions methodImplOptions)
40  {
41  _val = methodImplOptions;
42  }
43 
46  public MethodImplAttribute(short value)
47  {
48  _val = (MethodImplOptions)value;
49  }
50 
53  {
54  }
55  }
56 }
MethodCodeType
Defines how a method is implemented.
MethodImplAttributes
Specifies flags for the attributes of a method implementation.
Represents the base class for custom attributes.
Definition: Attribute.cs:15
Definition: __Canon.cs:3
MethodCodeType MethodCodeType
A T:System.Runtime.CompilerServices.MethodCodeType value indicating what kind of implementation is pr...
MethodImplAttribute(MethodImplOptions methodImplOptions)
Initializes a new instance of the T:System.Runtime.CompilerServices.MethodImplAttribute class with th...
MethodImplAttribute()
Initializes a new instance of the T:System.Runtime.CompilerServices.MethodImplAttribute class.
Specifies the details of how a method is implemented. This class cannot be inherited.
MethodImplOptions Value
Gets the T:System.Runtime.CompilerServices.MethodImplOptions value describing the attributed method.
MethodImplOptions
Defines the details of how a method is implemented.
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
MethodImplAttribute(short value)
Initializes a new instance of the T:System.Runtime.CompilerServices.MethodImplAttribute class with th...
Specifies that the class can be serialized.