Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find which classes implement a given interface in Visual Studio?

Tags:

I have a solution.
I have an interface.
I have several classes that implement the interface.

I can use "Find All References" in order to find where the interface is implemented, but it also returns results where the interface is the return type, or where a class explicitly implements an interface's method.

Is there a better way to quickly/easily find which classes implement the interface?

like image 543
John B Avatar asked Jun 04 '09 17:06

John B


People also ask

How do you know if a class implements an interface?

To declare a class that implements an interface, you include an implements clause in the class declaration. Your class can implement more than one interface, so the implements keyword is followed by a comma-separated list of the interfaces implemented by the class.

Which class can implement an interface?

A class implements an interface, thereby inheriting the abstract methods of the interface. Along with abstract methods, an interface may also contain constants, default methods, static methods, and nested types.


1 Answers

Using VS2010, with Productivity Power Tools (free) installed:

  1. Leave debug mode if necessary
  2. Hover over a reference to the interface
  3. Expand the drop down that appears
  4. "Implemented By"
like image 154
sennett Avatar answered Oct 12 '22 11:10

sennett