ReSharper 8.0 Web Help

ReSharper | Inspect | Type Hierarchy

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


Starting from ReSharper 7, you can invoke Hierarchy on a polymorphic member and distinguish, in which types this member has or has not been implemented. Also, you can view hierarchy of CSS styles.

To investigate hierarchy
  1. Open the desired type in the editor or expand it in the Solution Explorer, and place the cursor on the type or a type member.
  2. On the main menu, choose ReSharper | Inspect | Hierarchies , or press Ctrl+Alt+HCtrl+E,H.
  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 and ReSharper displays a search box and 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.


If the Hierarchy window is closed, you can view and examine previously generated hierarchies at any time by choosing ReSharper | Windows | Hierarchies on the main menu.
However, this command does not build any new hierarchies and the window may be empty if you have not built any hierarchies since the current solution has been open.

To rebuild a hierarchy for an intermediate node
  1. In the hierarchy tree view, select the desired node.
  2. Click Base on This Reference__Windows__Type_Hierarchy_Window__Base_on_This on the toolbar or choose the corresponding command in the context menu of the selection.
To preview members of a type selected in the hierarchy
  1. Select a type in the hierarchy.
  2. Click Show Members toolbar_show_preview on the toolbar or press Alt+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 toolbar_show_preview 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 Reference__Windows__Type_Hierarchy_Window__All_Instance_Members and Only Polymorphic Members Reference__Windows__Type_Hierarchy_Window__Only_Polymorphic_Members buttons at the top of the preview pane.


You can reach all Refactorings available for members directly from the Hierarchy window. Right-click on a member and choose a desired refactoring command in the context menu.

This feature is supported in the following languages/technologies:

C# VB.NET HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts
feature_available feature_available


The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see the corresponding topics in the ReSharper by Language section.