Search code examples
c#visual-studiovisual-studio-2019call-hierarchy

View Call Hierarchy says Cursor must be on a member name


I've read this great post about how to find all implementations of an interface. However, after clicking in context menu View Call Hierarchy, then it says Cursor must be on a member name:

enter image description here

What I do is:

  • double click at the interface
  • then click View Call Hierarchy

enter image description here

How is it possible to see View Call Hierarchy by clicking at the interface?


Solution

  • That question is about implementations of an interface method. You want implementations of the interface as a whole.

    Just right-click the interface and click "Go To Implementation (Ctrl+F12)", it's right there in the menu name. This will open the class if one exists, or show a list of classes if multiple implement it.