Navigate inheritance hierarchy with gutter marks
For types and type members that have base symbols or inheritors elsewhere in the solution and referenced assemblies, ReSharper shows gutter icons that let you navigate up and down the inheritance hierarchy:
The following icons indicate base symbols and inheritors in different cases:
The interface or the interface member has implementations; you can navigate to these implementations. | |
The class has derived classes or the class member is overridden elsewhere; you can navigate to these inheritors and overrides. | |
The member hides another member from a base type; you can navigate to the hidden member. | |
The member hides one member and implements another member from the inheritance hierarchy; you can navigate to both the hidden and the overridden members. | |
The type or type member implements an interface; you can navigate to the interface type or member. | |
The member implements an interface member that has a default implementation and you can navigate to it. | |
The class is inherited from another class or the class member overrides a virtual or abstract member; you can navigate to the base class or member. | |
The class implements an interface and inherits from a base class, or the member overrides a virtual or abstract member, which implements an interface member; you can navigate to the overridden and implemented types or members. |
You can hover the mouse to see the quick summary and click icons to navigate. If there is a single base or inherited symbol, ReSharper will navigate directly to that symbol; if there are multiple results, you will be able to choose the target from the list. If you want to see the list even if there is only one target, clear the Go to Base/Inheritor: if there is only one result, navigate without displaying the list checkbox on the page of ReSharper options (Alt+R, O).
If you prefer using the keyboard, set the caret at a line that has a gutter mark, press Alt+Enter, and pick the navigation action from the menu. Alternatively, you can use the dedicated navigation commands:
Go to Base Symbols Control+U to navigate to base types or members.
Go to Derived Symbols Control+Shift+Alt+B to list all derived symbols for a type or a member and navigate directly to one of them.
Go to Implementation Control+Shift+Alt+B to find actual implementations of types and members bypassing intermediate steps in the inheritance hierarchy.
Visual Studio inheritance margin
Starting from version 16.10, Visual Studio provides ist own implementation of the inheritance margin, which is similar to the ReSharper functionality but has some minor differences. For example, Visual Studio inheritance margin has additional icons for cases when a type is both base and derived, but it does not display icons for hiding members, it interferes with breakpoints, and so on.
By default, ReSharper hides Visual Studio inheritance margin and displays its own icons in the gutter. If you prefer to use Visual Studio inheritance margin or both, use the options under Inheritance margin on the page of ReSharper options (Alt+R, O).
Performance considerations
To find out whether the type or a member has inheritors and display the corresponding gutter mark, ReSharper has to perform some calculations. Although these calculations are performed efficiently and without any performance impact in most cases, large inheritance hierarchies with the combination of weak hardware could lead to some performance degradation. If such cases, you can clear the Show gutter navigation marks for implemented and overridden types and members checkbox on the page of ReSharper options (Alt+R, O) to avoid complex calculations and thus improve performance.
On the other hand, on-the-fly detection of base types or members is much cheaper performance-wise. Therefore, the hierarchy marks for types and members that implement or override other types or members are not disabled with this option.
This feature is supported in the following languages and technologies:
The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by language section.