System.Reflection.Emit namespace contains classes that allow a compiler or tool to emit metadata and Microsoft intermediate language (MSIL) and optionally generate a PE file on disk. The primary clients of these classes are script engines and compilers.
Namespace hierarchy Classes
Class Description AssemblyBuilder Defines and represents a dynamic assembly. ConstructorBuilder Defines and represents a constructor of a dynamic class. CustomAttributeBuilder Helps build custom attributes. EnumBuilder Describes and represents an enumeration type. EventBuilder Defines events for a class. FieldBuilder Defines and represents a field. This class cannot be inherited. ILGenerator Generates Microsoft intermediate language (MSIL) instructions. LocalBuilder Represents a local variable within a method or constructor. MethodBuilder Defines and represents a method (or constructor) on a dynamic class. MethodRental Provides a fast way to swap method body implementation given a method of a class. ModuleBuilder Defines and represents a module. Get an instance of ModuleBuilder by calling DefineDynamicModule. 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. PropertyBuilder Defines the properties for a type. SignatureHelper Provides methods for building signatures. TypeBuilder Defines and creates new instances of classes during runtime. UnmanagedMarshal Represents the class that describes how to marshal a field from managed to unmanaged code. This class cannot be inherited. Structures
Structure Description EventToken Represents the Token returned by the metadata to represent an event. FieldToken The FieldToken struct is an object representation of a token that represents a field. Label Represents a label in the instruction stream. Label is used in conjunction with the ILGenerator class. MethodToken The MethodToken struct is an object representation of a token that represents a method. OpCode Describes a Microsoft intermediate language (MSIL) instruction. ParameterToken The ParameterToken struct is an opaque representation of the token returned by the metadata to represent a parameter. PropertyToken The PropertyToken struct is an opaque representation of the Token returned by the metadata to represent a property. SignatureToken Represents the Token returned by the metadata to represent a signature. StringToken Represents a token that represents a string. TypeToken Represents the Token returned by the metadata to represent a type. Enumerations
Enumeration Description AssemblyBuilderAccess Defines the access modes for a dynamic assembly. 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. PEFileKinds Specifies the type of the portable executable (PE) file. StackBehaviour Describes how values are pushed onto a stack or popped off a stack. See Also
.NET Framework Class Library