CHAPTER 36

image

Execution-Time Code Generation

If you come from a C++ background, it’s likely you have a very “compile-time” view of the world. Because a C++ compiler does all code generation when the code is compiled, C++ programs are static systems that are fully known at compile time.

The Common Language Runtime provides a different way of doing things. The compile-time world still exists, but it’s also possible to build dynamic systems where new code is added by loading assemblies or even by writing custom code on the fly.

Loading Assemblies

In the .NET Common Language Runtime, it’s possible to load an assembly from disk and to create instances ...

Get A Programmer's Guide to C# 5.0, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.