<p>Does anybody know any good resources for learning how to program CIL with in-depth descriptions of commands, etc.? I have looked around but not found anything particularly good.</p>

[{'answer_id': 44944, 'author': 'Eric Z Beard', 'author_id': 1219, 'author_profile': 'https://Stackoverflow.com/users/1219', 'pm_score': 1, 'selected': False, 'text': '<p><a href="https://rads.stackoverflow.com/amzn/click/com/1590596463" rel="nofollow noreferrer" rel="nofollow noreferrer">Expert .NET 2.0 IL Assembler  by Serge Lidin</a></p>\n\n<p>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.</p>\n\n<p>[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.</p>\n'}, {'answer_id': 44947, 'author': 'Curt Hagenlocher', 'author_id': 533, 'author_profile': 'https://Stackoverflow.com/users/533', 'pm_score': 5, 'selected': True, 'text': '<p>The only CIL book on my shelf is <a href="https://rads.stackoverflow.com/amzn/click/com/1590596463" rel="nofollow noreferrer" rel="nofollow noreferrer">Expert .NET 2.0 IL Assembler</a> by Serge Lidin.  In terms of what the individual opcodes do or mean, the Microsoft documentation on System.Reflection.Emit has some pretty good information.  And it\'s always useful to look at existing IL with <a href="http://www.red-gate.com/products/reflector/" rel="nofollow noreferrer">Reflector</a>.</p>\n\n<p><strong>Edit:</strong> CIL (and indeed the CLR in general) has not changed at all between .NET 2.0 and .NET 3.5 -- the underlying runtime is basically the same, modulo fixes and performance improvements.  So there\'s nothing newer available on a CIL level than what would be in a book on 2.0</p>\n'}, {'answer_id': 203225, 'author': 'Vern Eastley', 'author_id': 8510, 'author_profile': 'https://Stackoverflow.com/users/8510', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://www.apress.com/book/view/1590596463" rel="nofollow noreferrer">Expert .NET 2.0 IL Assembler</a> rocks because the author writes well and includes every freaking detail you can imagine. It doesn\'t hurt that he wrote the IL assembler, disassembler and validator. Best of all you can buy it in a PDF instead of a dead tree.</p>\n\n<p>Masochists interested in compiler development will also enjoy <a href="https://rads.stackoverflow.com/amzn/click/com/0130622966" rel="nofollow noreferrer" rel="nofollow noreferrer">Compiling for the .NET Common Language Runtime</a> by John Gough. I found this book immensely helpful during a virtual machine development project where I "stole" lots of ideas from the CLR design.</p>\n'}]
['https://Stackoverflow.com/questions/44940', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3394/']