Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advantages of CIL knowledge in .NET [closed]

Tags:

c#

.net

cil

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?

like image 540
Joan Venge Avatar asked Feb 11 '09 17:02

Joan Venge


People also ask

What is the significance of CIL or IL for .NET aware language?

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.

What is CIL in .NET framework?

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.

What is .NET framework and its benefits?

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.

What is CLR in .NET framework with example?

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.


1 Answers

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.

like image 174
MichaelGG Avatar answered Sep 20 '22 10:09

MichaelGG