4.3. Disassembling an assembly file

VS .NET comes with a GUI-based disassembler tool which can be used to view the contents of the IL file. The IL disassembler can be really useful if you are really interested in understanding how things really work underneath, how different .NET compilers optimize their codes, and similar issues.

Fire up IL disassembler from the command prompt by typing:

c:\expt>ildasm HelloWorld.exe

Figure 4.4 shows a screenshot of the disassembler at work. This book does not go into IL specifics.

Figure 4.4. The IL disassembler tool shows the contents of the HelloWorld.exe assembly. The IL equivalent of the Main() method in HelloWorld.cs is shown here.

Get From Java to C#: A Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.