What are the advantages of understanding CIL?
Do you have to know assembly to understand it? The code in these files looks similar.
How do I learn more about it? Any books about it like Jon Skeet's C# book?
Understanding CIL is very important in writing dynamic assembly, allows developer to do changes in assembly by changing the IL code directly even if source code is not available and above all it gives clear understanding of internals of . net languages.
CIL is the bytecode language that the just-in-time (JIT) compiler of the . NET Framework interprets. Microsoft Dynamics AX converts compiled X++ code, or p-code, to CIL.
The . NET Framework is an open-source developer platform you can use to create a broad range of applications. This free cross-platform framework accepts multiple coding languages and features large code libraries that make it easy to build applications for mobile devices, desktops, the web and the Internet of Things.
The Common Language Runtime (CLR) is programming that manages the execution of programs written in any of several supported languages, allowing them to share common object-oriented classes written in any of the languages. It is a part of Microsoft's . NET Framework.
I found these books useful when learning IL and about the CLR:
Inside the IL Assembler, Serge Lidin
Compiling for the .NET Common Language Runtime, John Gough
And of course, you'll want to have the ECMA specs.
Just reading through them will give you lots of information.
(I've also heard CLR via C# is really good, but haven't read it myself.)
Understanding IL and the CLR will give you a leg up when you run into a problem. (A leaky abstraction?) Although, these days with nice decompilers like Reflector, I don't find myself using ildasm as much.
Understanding assembly isn't necesarily required, but it would help. IL is actually pretty simple for the most part.
One example of where IL came in handy was determining exactly how exactly F# compiles certain constructs. Another is being able to use DynamicMethod and System.Reflection.Emit, which can open up some nice solutions in certain situations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With