System.Runtime.CompilerServices
The namespace System.Runtime.CompilerServices contains objects used by developers of language compilers. Since all source languages have to compile down to the same MSIL, writing a compiler for the .NET Framework requires more intimate and pervasive connection with the target system than a bare Windows compiler.
The class MethodImplAttribute, deriving from System.Attribute, is a metadata attribute that specifies how a method is implemented. It contains values from the MethodImplOptions enumeration. Examples of the options it can specify are NoInlining, which specifies that the method must be called by a jump and may not be compiled inline, or ForwardRef, which specifies that the method is declared in a particular location but its implementation is elsewhere.
The class DecimalConstantAttribute, deriving from System.Attribute, stores the value of a System.Decimal constant in metadata. The class IsVolatile, while not deriving from System.Attribute, emits metadata marking a field as volatile.
The RuntimeHelpers class is a set of static methods and properties that provide support for certain compiler operations. For example, it contains a method called GetObjectValue, which accepts a value type such as an integer and returns it in a System.Object, a process known as "boxing," referring to packaging rather than pugilism.
|