IL Code

By now we already know the role of IL code as a language-independent format in which to express instructions. However, its generic nature extends in the other direction, too: Being an intermediate representation, it also allows decoupling from the specifics of any underlying hardware platform. The result is a very generic instruction set that’s rich enough to express the needs of various languages and simple enough to be mapped onto processor instructions, as we’ll see later.

Let’s take a closer look at one of the methods declared in our program (the Calculator’s Add method). Here’s what it looks like:

.method public hidebysig instance int32  Add(int32 a,                                             int32 ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

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