public sealed class MethodImplAttribute : Attribute
Object
Attribute
MethodImplAttribute
mscorlib
RuntimeInfrastructure
Specifies the details of how a method is implemented.
Compilers are required to not preserve this type in metadata as a custom attribute. Instead, compilers are required to emit it directly in the file format, as described in Partition II of the CLI Specification. Metadata consumers, such as the Reflection API, are required to retrieve this data from the file format and return it as if it were a custom attribute.[Note: This class uses the MethodImplOptions enumeration to describe the implementation details of methods. For most languages, it is recommended that the notions of "forward" and "synchronized" be attached to methods using language syntax instead of custom attributes. ]
AttributeUsageAttribute(AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple=false, Inherited=false)
System.Runtime.CompilerServices Namespace
MethodImplAttribute Constructors
MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions) Constructor
MethodImplAttribute(short) Constructor
MethodImplAttribute() Constructor
MethodImplAttribute Properties
public MethodImplAttribute(MethodImplOptions methodImplOptions);
Constructs and initializes a new instance of the MethodImplAttribute class using the specified MethodImplOptions value.
- methodImplOptions
- A MethodImplOptions value that specifies a property of the method attributed by the current instance.
System.Runtime.CompilerServices.MethodImplAttribute Class, System.Runtime.CompilerServices Namespace
public MethodImplAttribute(short value);
Constructs and initializes a new instance of theMethodImplAttribute
class with the specified Int16 value interpreted as a MethodImplOptions value.
- value
- A Int16 that is interpreted as a bit-field that represents the desired MethodImplOptions value, which specifies a property of the method attributed by the current instance.
System.Runtime.CompilerServices.MethodImplAttribute Class, System.Runtime.CompilerServices Namespace
public MethodImplAttribute();
Constructs a new instance of theMethodImplAttribute
class.
System.Runtime.CompilerServices.MethodImplAttribute Class, System.Runtime.CompilerServices Namespace
public MethodImplOptions Value { get; }
Gets the MethodImplOptions value describing the method attributed by the current instance.
The MethodImplOptions value describing the method attributed by the current instance.
This property is read-only.
System.Runtime.CompilerServices.MethodImplAttribute Class, System.Runtime.CompilerServices Namespace