Skip to Content
Professional Visual Basic 2012 and .NET 4.5 Programming
book

Professional Visual Basic 2012 and .NET 4.5 Programming

by Bill Sheldon, Billy Hollis, Rob Windsor, David McCarter, Gastón Hillar, Todd Herman
January 2013
Intermediate to advanced
912 pages
26h 58m
English
Wrox
Content preview from Professional Visual Basic 2012 and .NET 4.5 Programming

IL Disassembler

One of the many handy tools that ships with Visual Studio is the IL Disassembler (ildasm.exe). It can be used to navigate the metadata within a module, including the types the module exposes, as well as their properties and methods. The IL Disassembler can also be used to display the IL contained within a module.

You can find the IL Disassembler in the SDK installation directory for Visual Studio 2012; the default path is C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools. Note there is a 64-bit version in a sub folder of this location. When you start the application a window similar to the one shown in Figure 2.3 will be displayed.

Figure 2.3 ILDasm window

2.3

Within this window, select File ⇒ Open. Open mscorlib.dll, which should be located in your system directory with a default path of C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll.

Once mscorlib.dll has been loaded, ILDasm will display a set of folders for each namespace in this assembly. Expand the System namespace, then the ValueType namespace, and finally double-click the Equals method.

Figure 2.4 IL code for method Equals

2.4

Figure 2.4 shows the IL for the Equals method. Notice how the Reflection API is used to navigate through the instance of the value type's fields in order ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Visual Basic 2012 Programmer's Reference

Visual Basic 2012 Programmer's Reference

Rod Stephens

Publisher Resources

ISBN: 9781118332139Purchase book