What is the use of IL file generated from .NET (using MSIL assembler- ilasm.exe)?
I read it from http://msdn.microsoft.com/en-us/library/496e4ekx.aspx
but i am not sure about the use of IL file generated from .NET (using MSIL assembler- ilasm.exe).
Can any one explain me?
You might want to use IL directly in those (admittedly rare) situations when a higher level language like C# doesn’t provide the precision or features you need.
For instance, there are some features in
System.Dynamicthat are used from the dynamic languages such as IronPython that can’t easily be used in C#. Going straight to IL can help in those situations where you need to mix languages, perhaps for a third-party library.On the other hand, disassembling to IL can be very useful as you can find exactly what the code is that the compiler generated for your C# program. This is invaluable for micro-optimising performance issues, for example.