ReSharper 2020.3 Help

Explore Type Hierarchy

ReSharper | Inspect | Hierarchies
Control+Alt+H
ReSharper_TypeHierarchyBrowse

With ReSharper, you can investigate the inheritance hierarchy of types from your solution and from referenced libraries. You can see both base types and inheritors of the selected type and navigate to any of them with a mouse click. For any node in the hierarchy, you can view all or only polymorphic members in the preview pane.

Investigate hierarchy

  1. Locate the desired type in the editor or expand it in the Solution Explorer.

  2. Press Control+Alt+H or choose ReSharper | Inspect | Hierarchies from the main menu. Alternatively, you can press Control+Shift+A, start typing the command name in the popup, and then choose it there.

  3. Examine type hierarchy in the dedicated tab that adds to the Hierarchy window.

Some symbols in the tree are displayed in a bold font. It means that they inherit directly from the type being examined.

Viewing type hierarchy

Hierarchies can be rather complicated, making it difficult to find one particular symbol, especially when you have doubts about its name and place in the hierarchy. In such case you can start typing a part of symbol's name or its CamelHumps abbreviation and ReSharper narrows down the set of elements in the window:

Filtering members in type hierarchy

If you want to see what modules contain symbols in the hierarchy, select Containing Modules Hierarchy in the Group by list.

You can also visualize the current hierarchy on the type dependency diagram by clicking the Show on Diagram Themed icon type layout alt screen gray on the toolbar.

Rebuild a hierarchy for an intermediate node

  1. In the hierarchy tree view, select the desired node.

  2. Click Base on This Themed icon base screen gray on the toolbar or choose the corresponding command in the context menu of the selection.

Preview members of a type selected in the hierarchy

  1. Select a type in the hierarchy.

  2. Click Show Members Themed icon preview toggle screen gray on the toolbar or press Ctrl+P. The members preview pane displays at the bottom of the window:

    Members preview in the Hierarchy window

  3. You can move the preview pane to the right of the window by clicking the down arrow next to Show Members Themed icon preview toggle screen gray on the toolbar and selecting Right.

  4. You can also preview either all members of a type, or just those that are polymorphic. To switch between these two modes, use the All Instance Members Themed icon all members screen gray and Only Polymorphic Members Themed icon virtual members screen gray buttons at the top of the preview pane.

This feature is supported in the following languages and technologies:

Language: C#Language: VB.NETLanguage: C++Language: HTMLLanguage: ASP.NETLanguage: RazorLanguage: JavaScriptLanguage: TypeScriptLanguage: CSSLanguage: XMLLanguage: XAMLLanguage: ResxLanguage: Build ScriptsLanguage: ProtobufLanguage: JSON
Feature is available in C#Feature is available in Visual Basic .NETFeature is available in C++ Feature is not available in HTML Feature is not available in ASP.NET Feature is not available in Razor Feature is not available in JavaScript Feature is not available in TypeScript Feature is not available in CSS Feature is not available in XML Feature is not 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 details specific to other languages, see corresponding topics in the ReSharper by Language section.

Last modified: 08 March 2021