views:

1068

answers:

4

Is there a way/tool that could show me all the classes/interfaces that implement a certain interface in my project? In Eclipse (Java) I would use the context menu "Open Type Hierarchy" option, which would show me a (pretty) tree of types that extend the selected type. Is there a tool to do the same in .NET?

+1  A: 

Reflector will do this (and is free). Find the interface, and expand the "Derived Types" node in the tree.

Alternatively, the "Class Diagram" project item in Visual Studio should do it, but I like the clean nature of Reflector.

Marc Gravell
Thanks. I'll give it a try.
Hosam Aly
To get started, use File->Open... and open your project dll(s)
Marc Gravell
Reflector did exactly what I needed. Thanks.By the way, the Class Diagram Editor wouldn't have worked for me, because I wanted to check all derived types of a system class.
Hosam Aly
A: 

The Resharper visual studio plugin also has a View Type Hierarchy feature along with its many other great features.

Mike Two
Resharper certainly looks like a good tool, but it's not free. I come from a Java background, so I'm used to getting all the nice goodies for free. :D
Hosam Aly
That's true. I also come from a Java background, and I found that some of the nicer goodies in Java aren't free either. I always preferred the IntelliJ IDE to Eclipse. Sometimes you get what you pay for. Resharper saves me so much time it is worth the money.
Mike Two
+8  A: 

I second Marc's recommendation of .NET Reflector - and would like to add that there is an impressive series of add-in available at CodePlex.

Just a few of the add-ins I use with regularity:

  • Deblector - This add-in allows to debug processes from within Reflector.
  • Graph - This add-in draws assembly dependency graphs and IL graphs.
  • DependencyStructureMatrix - Allows you to create and browse dependency structure matrices.
  • AutoDiagrammer - This add-in draws class diagrams.
  • CodeModelViewer - This add-in shows the underlying code model objects for selected items.
joseph.ferris
A: 
gimel
But not sub-types / implementing-types
Marc Gravell