CIL Programming Under the Hood of .NET
Most .NET developers will use a high-level language, such as C# or VB .NET, to develop their systems. However, the core language of .NET is the Common Intermediate Language, or CIL. This language is the language of .NET-whatever is allowed by the .NET specifications can be done in CIL, and it can do much that C# and VB .NET cannot. Understanding how the CIL works will give .NET developers a deep, language-independent insight into the core parts of .NET. Furthermore, such knowledge is essential for creating dynamic types, a powerful part of the .NET Framework. In this book, Bock covers the essentials of programming the CIL. First, he discusses the basics of what .NET: assemblies are, how manifests fit into the picture, and much more. Bock then shows how to create assemblies in .NET-this will cover the ilasm directives and CIL opcodes, and how these are used to define assemblies, classes, field, methods, and method definitions. Bock also covers how C# and VB .NET and other non-MS languages emit CIL and how they differ. Finally, Bock shows how one can create dynamic assemblies at runtime via the Emitter classes.