ReSharper 2024.3 Help

Go to Usages of Symbol

This command allows you to quickly navigate to a specific usage of a symbol from its declaration or any other usage. You can invoke this command from the Solution Explorer, File Structure window, and other tool windows. The opposite navigation is available with the Go to Declaration command.

The list of usages that you get with this command is the same as that of Find Usages. But this command is more convenient for symbols with a limited number of usages, in cases when you are looking for a specific usage and want to get to this usage without opening the Find Results window.

You can configure ReSharper behavior for the cases when a single usage is discovered. By default, the usage is displayed in a popup. If you want ReSharper to jump tho the single usage in these cases, select the corresponding option (Go to Usage: if there is only one result, navigate without displaying the list) on the Environment | Search & Navigation | General page of ReSharper options Alt+R, O.

  1. Place the caret at a symbol in the editor or select the symbol in a tool window.

  2. Press Control+Alt+F7 or choose ReSharper | Navigate | Show Usages 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. If there are multiple usages, they appear in a popup with their contexts. Do one of the following:

    • Click the desired item to open it in the editor.

    • Select the desired item by pressing Up and Down and then press Enter to open it in the editor.

    • Start typing to filter results. Note that you can use CamelHumps here. If necessary, press Esc once to clear the filtering.

    • To view and analyze the list of matched items in the Find Results window, click Show in Find Results ThemedIcon.SearchResults.Screen.(Gray).png, press Shift+Enter or + on the numeric keypad .

    • To show the matched items on the type dependency diagram, press Alt+Num+ or click Show on Diagram Show on Diagram.

You can also list and study symbol usages in the Peek Definition view.

To do so, by default you can Ctrl-click the declaration or any usage with the middle mouse button. If you want to disable this, clear the Use Ctrl+Middle Button Click Peek Usages checkbox on the Environment | Search & Navigation page of ReSharper options Alt+R, O. Or you can always invoke this command from the main menu: ReSharper | Navigate | Peek | Peek Usages.

  1. Search the desired symbol using one of the following commands:

  2. When the desired symbol appears in the results list, select it using the keyboard and then press Control+Alt+F7.

  3. If there are multiple usages, they appear in a popup with their contexts. Do one of the following:

    • Click the desired item to open it in the editor.

    • Select the desired item by pressing Up and Down and then press Enter to open it in the editor.

    • Start typing to filter results. Note that you can use CamelHumps here. If necessary, press Esc once to clear the filtering.

    • To view and analyze the list of matched items in the Find Results window, click Show in Find Results ThemedIcon.SearchResults.Screen.(Gray).png, press Shift+Enter or + on the numeric keypad .

    • To show the matched items on the type dependency diagram, press Alt+Num+ or click Show on Diagram Show on Diagram.

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 available in HTML

Feature is available in ASP.NET

Feature is available in Razor

Feature is available in JavaScript

Feature is available in TypeScript

Feature is available in CSS

Feature is available in XML

Feature is available in XAML

Feature is available in Resource files

Feature is available in build script files

Feature is 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: 23 September 2024