#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.

Advertisements

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: