O'Reilly logo

Delphi for .NET Developer’s Guide by Xavier Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Emitting MSIL Through Reflection

The .NET framework provides you with the capability to create code on-the-fly through the System.Reflection.Emit namespace. The code that you create through Emit is MSIL code. Essentially, the functionality in this namespace gives you the ability to dynamically create an assembly and a module within that assembly. You can dynamically define any number of classes and methods within the assembly’s module, and then invoke those methods at runtime (which will automatically be JIT compiled to very efficient machine code). You can even save the assembly to disk for later use.

Note

In addition to having the capability to generate MSIL code through System.Reflection.Emit, the .NET CodeDom technology provided by the

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required