17.5. Understanding CIL Directives and Attributes

Now that you have seen how ildasm.exe and ilasm.exe can be used to perform a round-trip, you can get down to the business of checking out the syntax and semantics of CIL itself. The next sections will walk you through the process of authoring a custom namespace containing a set of types. However, to keep things simple, these types will not contain any implementation logic for their members (yet). Once you understand how to create empty types, you can then turn your attention to theprocess of defining "real" members using CIL opcodes.

17.5.1. Specifying Externally Referenced Assemblies in CIL

Create a new file named CilTypes.il using your editor of choice. The first task a CIL project will require ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.