1

with Visual Studio Call Hierarchy functionality I can find calls to a certain method.

However, it doesn't seem to be able to find class through an implemented interface. Like in the following, if Method() is called through IFoo, these calls aren't found in the Call Hierarchy?

   interface IFoo
   {
       void Method();
   }

   class Foo : IFoo
   {
       public void Method() 
       {
           // ...
       }
   }

Is there some way to do this in plain VS or with some free plugin?

Resharper seems to be able to do this (with some problems with more complicated cases) as in C# - Can't find usage of method when inherited and used through an interface implemented by the subclass.

br, Touko

Community
  • 1
  • 1
Touko
  • 11,359
  • 16
  • 75
  • 105

2 Answers2

1

Well, I'd never heard of Call Hierarchy before; I always use Find Symbol References - Shift + F12 on anything, including method names. This picks up calls via interfaces.

Graham Clark
  • 12,886
  • 8
  • 50
  • 82
0

Reshaper has feature called go to implementation. It allows you to find all classes that implement particular method or interface.

Also it has a find usages. And it is able to search usages from interface or directly from class depending on what you need.

Community
  • 1
  • 1
Sly
  • 15,046
  • 12
  • 60
  • 89