• DotNet

    What is IL – practical example

    I’m sure you know your C# code is not directly compiled into machine code and ran. It is first converted into IL. CIL to be precise. Its stands for Common Intermediate Language. This CIL is then assembled into bytecode and compiled by JIT (Just-in-time compiler) into executable machine code. So much for the theory, but have you ever tried to mess with IL yourself? Not? Lets try it. Run the Visual Studio Command Prompt from the start menu. Find yourself suitable directory to tinker around. Create a program, compile it and run: C:\Dev\ilmagic>copy con p.cs public class p { public static void Main() { System.Console.WriteLine("Hello console!"); } }^Z 1 file(s)…