System.CodeDom namespace in .NET Framework Class Library
The System.CodeDom namespace
contains classes that can be used to represent the elements and structure of a source code document. The classes in this namespace can be used to model the structure of a source code document that can be output as source code in a supported language using the functionality provided by the System.CodeDom.Compiler namespace.
The strength here comes from the fact that applications can generate code at runtime, compile it in memory, and execute it. This allows applications to respond to a changing environment in real time, or to exploit the highly-optimized CLR Execution engine in application-specific ways. A great example would be a programmable logic controller in a manufacturing or process control system an application could dynamically generate MSIL corresponding to the logic as it changes.