ReSharper 2026.2 Help

Call Hierarchy

Call Hierarchy enables you to view and navigate through call chains in your code. ReSharper Call Hierarchy is a substantial improvement over Visual Studio native Call Hierarchy, thanks to support for events, interfaces, and closures.

In the hierarchy view, ReSharper uses icons to distinguish between different kinds of symbols. If necessary, you can switch between icon sets using the 源代码符号图标主题 radio buttons on the 环境 | 常规 page of ReSharper options.

调查入站调用

  1. Place the caret at the name of a method, event, property, or constructor.

  2. From the main menu, choose ReSharper | Inspect | 传入调用 or press Control+Shift+Alt+A and choose 传入调用 in the 检查此 list .

  3. 在打开的 检查结果窗口 中,您可以展开成员节点以运行代码分析并显示调用当前成员的所有成员。 您还可以展开每个子节点。

    检查结果窗口中的入站调用

调查出站调用

  1. Place the caret at the name of a method, event, property, or constructor.

  2. From the main menu, choose ReSharper | Inspect | 传出调用 or press Control+Shift+Alt+A and choose 传出调用 in the 检查此 list .

  3. 在打开的 检查结果窗口 中,您可以展开成员节点以运行代码分析并显示当前成员调用的所有成员。 您还可以展开每个子节点。

    检查结果窗口中的出站调用

When you get a lot of calls in the call hierarchy results, you can hide specific calls or the whole branches of the result tree to have a clearer picture of what you are looking for.

请注意,当您在 检查结果窗口 中切换选项卡时,隐藏的条目会被重置。

从结果树中隐藏条目

  1. 右键单击您想要隐藏的条目,并在上下文菜单中选择 忽略

  2. 该条目会变灰,但仍然可见且可搜索。 工具栏上还会出现 显示忽略的用法 ThemedIcon.Ignore.Screen.(Gray).png 按钮。

  3. 要隐藏或显示忽略的条目,请切换 显示忽略的用法 ThemedIcon.Ignore.Screen.(Gray).png 按钮。

  4. 要重置忽略的条目,请打开 显示忽略的用法 ThemedIcon.Ignore.Screen.(Gray).png 按钮,右键单击一个变灰的项目,并在上下文菜单中选择 撤销忽略

此功能在以下语言和技术中是 支持的

语言:C#

语言:VB.NET

语言:C++

语言:ASP.NET

语言:Razor

语言:XAML

语言:Resx

语言:构建脚本

语言:SQL

功能在 C# 中可用

此功能适用于 Visual Basic

功能在 C++ 中可用

功能在 ASP.NET 中不可用

功能在 Razor 中不可用

功能在 XAML 中不可用

此功能不适用于资源文件

此功能不适用于构建脚本文件

功能在 SQL/NoSQL 文件和注入中不可用

此处提供的说明和示例介绍了在 C# 中使用该功能。 有关其他语言的更多信息,请参阅 语言和框架 部分中的相关主题。

2026年 7月 2日