The .NET node does not contain MSIL; it contains metadata and bytes that represent IL IL codes. Pure binary data, not text. Any .NET decompiler, such as ildasm.exe, knows how to convert bytes to text. This is pretty straight forward.
The C # compiler directly generates binary data, there is no intermediate text format. When you write your own IL code using a text editor, you need ilasm.exe to convert it to binary. This is pretty straight forward.
The most difficult task of generating binary data is btw metadata. It is overly micro-optimized to make it as small as possible, its structure is quite curved. No compiler generates bytes directly; they will use a pre-built component to do this work. It is noteworthy that Roslin had to rewrite this from scratch, a lot of work.
Hans passant
source share