Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This section describes a set of managed types in the System.Reflection.Emit namespace that allow a compiler or tool to emit metadata and common intermediate language (CIL) at run time and optionally generate a portable executable (PE) file on disk. Script engines and compilers are the primary users of this namespace. In this section, the functionality provided by the System.Reflection.Emit namespace is referred to as reflection emit.
Reflection emit provides the following capabilities:
In addition to the managed types in the System.Reflection.Emit namespace, there are unmanaged metadata interfaces that are described in the Metadata Interfaces reference documentation. Managed reflection emit provides stronger semantic error checking and a higher level of abstraction of the metadata than the unmanaged metadata interfaces.
Another useful resource for working with metadata and CIL is the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". The documentation is available online at the Ecma Web site.
OpCodes
Catalogs the CIL instruction codes you can use to build method bodies.
System.Reflection.Emit
Contains managed classes used to emit dynamic methods, assemblies, and types.
Type
Describes the Type class, which represents types in managed reflection and reflection emit, and which is key to the use of these technologies.
System.Reflection
Contains managed classes used to explore metadata and managed code.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Call methods from the .NET Class Library using C# - Training
Use functionality in the .NET Class Library by calling methods that return values, accept input parameters, and more.