Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding class descendants in Visual Studio 2010

I am looking at an abstract class in Visual Studio 2010's object browser. I would like to find all classes that descend from this abstract class so I can choose the best one to implement in my application. I do not have the source code for this assembly, so I can't use the find in files feature.

Unfortunately, I can't seem to find out how to do this at all. Visual Studio docs and Google just return completely irrelevant articles, so either I'm using the wrong terminology or this feature simply doesn't exist.

The best advice I've received is "analyse the assembly with redgate reflector", but surely there has to be a better way.

Thank you for your time.

like image 895
Steve Rukuts Avatar asked Sep 02 '10 09:09

Steve Rukuts


People also ask

How do I search for content in Visual Studio?

Find in Files allows you to search a specified set of files. The matches Visual Studio finds are listed in the Find Results window in the IDE. How the results appear depends on the options you choose on the Find in Files tab of the Find and Replace dialog box.

How do I open a class in Visual Studio?

To add a class in a Visual Studio C++ project, in Solution Explorer, right-click the project, choose Add, and then choose Class. This command opens the Add Class dialog box.


4 Answers

You can use the Solution Explorer for this purpose: 1) Find base class in the Solution Explores (you can use search line). 2) Right click on the base class in the Solution Explorer 3) Click "Derived Types"

To return to the main Solution Explorer view click "Home" button in the top of the Solution Explorer.

like image 160
Eugene Maksimov Avatar answered Oct 19 '22 20:10

Eugene Maksimov


On the "Browse" dropdown box of the Object Browser select an item other than "My Solution" or "All Components".

For example select ".NET Framework 4" or ".NET Framework 4.5"

like image 43
Jeremiah Flaga Avatar answered Oct 19 '22 18:10

Jeremiah Flaga


Install the Visual Studio Productivity Power Tools, then use its souped-up tooltip.

like image 26
SLaks Avatar answered Oct 19 '22 20:10

SLaks


If you want to conveniently navigate through a class hierarchy you won't be happy with the plain vanilla Visual Studio. Resharper and (I believe) CodeRush offer such a functionality. For the latter one there is a express edition, which is free. You can install all of them as Visual Studio Add-In.

like image 43
Theo Lenndorff Avatar answered Oct 19 '22 20:10

Theo Lenndorff