ReSharper 2016.1 Help

Finding Usages of a Symbol

ReSharper | Find | Find Usages
Alt+F7
ReSharper_FindUsages

This command allows finding all usages of a specific symbol in the solution. You can start the search from the declaration of the symbol or from any other usage. You can invoke this command from the editor, from the File Structure Window and other tool windows.

To find usages of a symbol

  1. Place the caret on a symbol in the editor or select the symbol in a tool window.
  2. Do one of the following:
    • On the main menu, choose ReSharper | Find | Find Usages.
    • Right-click the selection and choose Find Usages on the context menu.
    • Press Alt+F7.
  3. If a single usage is found, ReSharper will navigate you to the usage directly in the editor. Two or more search results will be shown in the Find Results Window.
Navigation_and_Search__Finding_Usages__Find_Usages__one_and_several

If necessary, you can change the default behavior so that the single found usage is also displayed in the Find Results window. To do so, clear the Go to Usage: if there is only one result.... check box in the Environment | Search & Navigation options page.

Finding usages of generic types

When searching for usages of generic types, e.g. IFoo<string>, you may actually want to find either all usages of IFoo<> or usages of the exact generic substitution IFoo<string> only.

By default, ReSharper allows you to disambiguate the search results by showing an additional popup:

You can also configure the feature so that a specific search logic (either all substitutions or the exact substitution) should be always performed. To do so, use the Find generic type usages behavior selector in the Environment | Search & Navigation options page.

This feature is supported in the following languages/technologies:

C# VB.NET C++ HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts Protobuf JSON
feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available 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 corresponding topics in the ReSharper by Language section.

See Also

Last modified: 19 August 2016