[ Go back to normal view ]

BW2 :: the bitwise supplement :: http://www.bitwisemag.com/2

Expert .NET 2.0 IL Assembler
Book Review

21 November 2006

by Dermot Hogan

Expert .NET 2.0 IL Assembler
by Serge Liden
Apress: www.apress.com
ISBN: 1-59059-646-3
Price $59.99 / £40.99 (Hardback)



There are some books that stick around for years – the original C Programming Language, for example. It wasn’t (and isn’t) a gripping read. But it did the job and, moreover, it still does. Expert .NET 2.0 IL Assembler hasn’t been around for anything like as long as the C book, but now in its second edition, like the C book, it does the job. In this case, the job in question is describing the .NET assembly language (Intermediate Language or IL) and its environment.

You might think that all you need to describe the .NET IL is a list of opcodes and some guidance on what they do. Indeed, the 2.0 IL Assembler book does have this information. But it also has a good deal more in its 500 pages. For example, there’s an entire chapter on the interaction between unmanaged and managed code (‘COM Interop’ and P/Invoke’ in Microsoft speak). This covers how data is marshaled between the two worlds and, more interestingly, how managed functions are called back via delegates. You might think that this is pretty rarified stuff, but if you have to build a large application involving managed code interfacing to legacy code, a good knowledge of how all this works is going to be pretty important.

A lot of the material in the book may only be of interest if you are writing a compiler. Then again, even if you aren’t doing that, having some background knowledge of exactly how, say, generic types work (two chapters on that) can be useful.

If you really want to see what’s going on inside a .NET assembly, then you have to use the Microsoft IL disassembler or a reflector of some sort. But to make sense of what these tools show you, you really need a book that goes into some depth. This is the strength of Expert .NET 2.0 IL Assembler. It gives a comprehensive insight into the inner workings of Microsoft’s Common Language Runtime. As the title suggests, it’s not a book aimed at beginners. But for experts, I’d definitely recommend that it should join the other .NET reference works on your programming shelf.