ReSharper 2024.1 Help

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:

ReSharper: Gutter icons and tooltips for base and implementing/overriding types and members

The following icons indicate base symbols and inheritors in different cases:

ThemedIcon.HasImplementations.Screen.(Gray).png

The interface or the interface member has implementations; you can navigate to these implementations.

ThemedIcon.HasOverrides.Screen.(Gray).png

The class has derived classes or the class member is overridden elsewhere; you can navigate to these inheritors and overrides.

ThemedIcon.Hides.Screen.(Gray).png

The member hides another member from a base type; you can navigate to the hidden member.

ThemedIcon.HidesAndImplements.Screen.(Gray).png

The member hides one member and implements another member from the inheritance hierarchy; you can navigate to both the hidden and the overridden members.

ThemedIcon.Implements.Screen.(Gray).png

The type or type member implements an interface; you can navigate to the interface type or member.

ThemedIcon.ImplementsOverDefault.Screen.(Gray).png

The member implements an interface member that has a default implementation and you can navigate to it.

ThemedIcon.Overrides.Screen.(Gray).png

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.

ThemedIcon.OverridesAndImplements.Screen.(Gray).png

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 over it 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 Environment | Search & Navigation | General page of ReSharper options Alt+R, O.

If you prefer using the keyboard, place 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 Environment | Editor | Visual Studio Features 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 Environment | Editor | Appearance 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:

Language: C#

Language: VB.NET

Language: C++

Language: HTML

Language: ASP.NET

Language: Razor

Language: JavaScript

Language: TypeScript

Language: CSS

Language: XML

Language: XAML

Language: Resx

Language: Build Scripts

Language: Protobuf

Language: JSON

Feature is available in C#

Feature is available in Visual Basic

Feature is available in C++

Feature is not available in HTML

Feature is available in ASP.NET

Feature is available in Razor

Feature is not available in JavaScript

Feature is available in TypeScript

Feature is not available in CSS

Feature is not available in XML

Feature is available in XAML

Feature is not available in Resource files

Feature is not available in build script files

Feature is not available in Protobuf

Feature is not available in JSON

The instructions and examples given here address the use of the feature in C#. For more information about other languages, refer to corresponding topics in the ReSharper by language section.

Last modified: 11 February 2024