Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 2.16 KB

File metadata and controls

26 lines (17 loc) · 2.16 KB

System.Reflection.Emit

Supports generating code dynamically and then running it in-memory. This is used to generate types dynamically which are commonly used to generate proxies and other dynamic classes that may not be known ahead-of-time (in which case C# generation could be used, for example). It is also used to invoke members more efficiently than the standard runtime invoke mechanism. However, starting in 7.0, most IL generation is now done automatically so the need to manually generate IL for performance is reduced.

Not all platforms and runtimes support IL.Emit.

Documentation can be found at https://learn.microsoft.com/dotnet/api/system.reflection.emit. The primary class is AssemblyBuilder.

Contribution Bar

See the Help Wanted issues.

The primary new feature under consideration is AssemblyBuilder.Save().

Deployment

System.Reflection.Emit is included in the shared framework. The package does not need to be installed into any project compatible with .NET Standard 2.1; it only needs to be installed when targeting .NET Standard 2.0.

Source

See also