#11 – Examine IL Using Ildasm.exe

In .NET, source is compiled to an platform-neutral intermediate language called Common Intermediate Language.  The IL is later compiled into native code at runtime, running in a virtual machine.

You can examine the IL for your applications by running a tool called the IL Disassembler (ildasm.exe).  You can find ILDasm in a directory that looks something like this:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64

Alternatively, you can just type “ildasm” in the Start Menu search box in Windows 7 or Windows Vista.

ILDasm will show you three basic things:

  • A list of all classes and methods in your assembly
  • The contents of the assembly’s manifest
  • IL code for any method implemented in the assembly.

Here’s an example of what is displayed in ILDasm.

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

4 Responses to #11 – Examine IL Using Ildasm.exe

  1. Pingback: #84 – Viewing Metadata as Source Code « 2,000 Things You Should Know About C#

  2. Pingback: #467 – Metadata « 2,000 Things You Should Know About C#

  3. msuworld says:

    new thing learned 🙂

  4. Pingback: #658 – What Boxing and Unboxing Look Like in IL « 2,000 Things You Should Know About C#

Leave a comment