It is a rarely used resource. "normal" programmer will probably never use it.
Essentially it serves to create an CIL. That is, it generates the "machine code" of the .NET. virtual machine. It is a simplified way to create a low-level code. He cares to assemble the proper format so that a machine code is understood by . NET.
This way it is possible to create arbitrary code at runtime to be written to a DLL (a file Assembly) or to be executed shortly thereafter. Whether to create some functionality that can only be mounted at runtime, or to achieve greater optimization.
- The LINQ, for example, makes much use of it to assemble your expression trees.
- Serialization also uses it.
- Object creation proxy uses this resource.
- Some situations the language does not support some resource that can only be achieved by issuing low-level code over high-level language.
- Dapper is one of the numerous Orms that use this broadcast.
Its use is intense in a compiler or some tool (AOP and mockers, are examples) amending the bytecode of the application developed for . NET (or any other compatible implementation, such as Mono, of course).
Now it is even less necessary. In most cases it is more interesting to use the services of the new compiler called .NET Compiler Platform (former Roslyn project) available at C# 6/Visual Studio 2015. Runtime code generation is much easier and powerful in most cases.
Official source of information.
Reference of namespace.
Now I understand! Thank you very much!
– Junior Dias