Click here to monitor SSC

Bart

Software Engineer - Red Gate Software

.NET Reflector Support: How can I decompile the implementation of an entire class or struct?

Published Tuesday, August 31, 2010 6:01 PM

With .NET Reflector you don't need to decompile a type method by method. You can do the whole thing at once, although it may not be immediately obvious how.

All you need to do is select the type you want in the assemblies list. If needs be right-click on it and click Disassemble. At this point all you'll see is the basic definition of the type, but none of the method implementations will have been decompiled. All you need to do now is scroll down to the bottom of the definition, and click the Expand Methods link. And voila! After a few seconds of chewing away Reflector will have decompiled the entire implementation for you.

This process is illustrated in figure 1, and figure 2 shows the result.

DecompileEntireType_Fig1_ExpandMethods_Small

Figure 1. I'm decompiling System.Array. Note that I've scrolled down to the bottom of the class definition, which includes a number of private types, until the Expand Methods link is in view. All I now need to do is click this link.

DecompileEntireType_Fig2_DoneIt_Small

Figure 2. Here's the result. You can see that .NET Reflector has completely decompiled the entire implementation of the System.Array class, along with its private types.

by Bart Read
Filed Under: ,

Comments

No Comments
You need to sign in to comment on this blog

About Bart Read

Bart has done many things since he started work at Red Gate Software Ltd in August 2004, but nowadays he's (mainly) the product manager for the .NET Developer Tools. He still feels like this is a bit like admitting you were cheering for the Empire whilst watching Star Wars, but for now he's along for the ride. In a previous incarnation he was a project manager leading the .NET Reflector Pro, ANTS Memory Profiler 5, ANTS Performance Profiler 4 & 5, and SQL Prompt 3.0 - 3.6 projects. He still occasionally writes some code and, in the past, has touched the code for most of the Red Gate SQL developer tools... some of them still haven't recovered from the shock. He was born and grew up in Dorset, was educated in Nottingham and London, and likes music and real ale. His photo is extremely misleading.
<August 2010>
SuMoTuWeThFrSa
25262728293031
1234567
891011121314
15161718192021
22232425262728
2930311234
Migrating from OCS 2007 R2 to Lync: Part 4
 Having migrated the rest of our users and legacy resources across, and start getting ready to... Read more...

Automated Script-generation with Powershell and SMO
 In the first of a series of articles on automating the process of building, modifying and copying SQL... Read more...

Seth Godin: Big in the IT Business
 Seth Godin has transformed our understanding of marketing in IT. He invented the concept of 'permission... Read more...

Using SQL Test Database Unit Testing with TeamCity Continuous Integration
 With database applications, the process of test and integration can be frustratingly slow because so... Read more...

Converting String Data to XML and XML to String Data
 We all appreciate that, in general, XML documents or fragments are held in strings as text markup. In... Read more...