Expert .NET 2.0 IL Assembler

Category: Programming
Author: Serge Lidin
All Stack Overflow 18
This Year Stack Overflow 1
This Month Stack Overflow 2


by anonymous   2019-07-21

I can recommend this book:

Expert .NET 2.0 IL Assembler by Serge Lidin

Also ILSpy is a very popular open source decompiler:

Looking around in that source code can probably be enlightening for you.

It seems also that ILDasm (the MSIL disassembler that comes with Visual Studio) is open source:

Hope some of this can help you.

by anonymous   2019-07-21

You might find this MSDN article interesting:

As well as these books:

by anonymous   2017-08-20

There are a few books that do cover IL:

Also some books on reverse engineering have sections on IL.

See also:

  • IL / CLR / DLR References?
  • What is your recommendation for a good book on the .NET CLR and CIL?
by anonymous   2017-08-20

While I agree with GregC in general there are times when this type of information is useful. But that is one tough question to be expected to answer in an interview (unless it's for the CLR team :)

Web Pages and Blogs...

  • Portable Executeable (wikipedia)


by Eric Z Beard   2017-08-20

Expert .NET 2.0 IL Assembler by Serge Lidin

There was a 1.1 version of the same book, but I haven't seen anything for the latest .NET release. It's an excellent book. I used it to write an OCR component in MSIL, as a learning project.

[Edit] @Curt is right, 3.0 and 3.5 are just extensions to 2.0, I hadn't plugged that in to my head yet. Now I've thought of a fun geek project... compare the disassembly of standard 2.0 code to the new LINQ/Lambda way of performing common tasks like filtering lists. For some reason I assumed that the magic was happening in new IL features, not just the compiler.

by anonymous   2017-08-20

An easy way to learn about IL is to write the code in e.g. C# and look at the generated IL. That way you can easily see what various code constructs map to. For a great book on the subject, I recommend Expert .NET IL Assembler.

by anonymous   2017-08-20

.NET assemblies don't use the traditional text segment to store their .NET code - only natively compiled code goes there. Instead they use special CLR structures inside the PE that only .NET assemblies have.

One of the "optional" headers in the PE file is the CLR Runtime Header, which has all the key information about where .NET-specific structures are located within the PE.

For more details on this, download the latest PE specification ("Microsoft Portable Executable and Common Object File Format Specification") from

For even more detailed explanations on how the many pieces of .NET executable code and corresponding data are organized in the PE, get Serge Lidin's book on the .NET assembler.