System.Reflection.Emit Namespace

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

The System.Reflection.Emit namespace contains classes that allow a compiler or tool to emit metadata and Microsoft intermediate language (MSIL). The primary clients of these classes are script engines and compilers.

Classes

Class Description
CustomAttributeBuilder Represents a custom attribute in a form that can be attached to a type or member that is being emitted.
DynamicMethod Defines and represents a dynamic method that can be compiled, executed, and discarded. Discarded methods are available for garbage collection.
ILGenerator Generates Microsoft intermediate language (MSIL) instructions.
LocalBuilder Represents a local variable within a method or constructor.
OpCodes Provides field representations of the Microsoft intermediate language (MSIL) instructions for emission by the ILGenerator class members (such as Emit).
ParameterBuilder Creates or associates parameter information.
SignatureHelper Provides methods for building signatures.

Structures

Structure Description
Label Represents a label in the instruction stream. Label is used in conjunction with the ILGenerator class.
OpCode Describes a Microsoft intermediate language (MSIL) instruction.

Enumerations

Enumeration Description
FlowControl Describes how an instruction alters the flow of control.
OpCodeType Describes the types of the Microsoft intermediate language (MSIL) instructions.
OperandType Describes the operand type of Microsoft intermediate language (MSIL) instruction.
PackingSize Specifies one of two factors that determine the memory alignment of fields when a type is marshaled.
StackBehaviour Describes how values are pushed onto a stack or popped off a stack.