While Go to Declaration command navigates you to the declaration of a symbol itself, the Type of Symbol command navigates to the declaration of a type that a variable, field, parameter, or method belongs to.
- Set the caret over a symbol in the code editor.
- Choose ReSharper | Navigate | Type of Symbol on the main menu or press Ctrl+Shift+T.
- If the type that the symbol belongs to has has only one declaration, ReSharper will navigate to it directly.
If there are several declarations, they will be listed in the drop-down list.
Do one of the following:
- To view the list of declarations in the Find Results window, click Show in Find Results or press + on the numeric keypad.
- To navigate directly to a declaration, select it in the drop-down list and press Enter.
If the target symbol belongs to the current solution, ReSharper will open the corresponding file in the editor and set the caret at the type declaration. If the symbol is found in referenced libraries, ReSharper navigates according to the settings defined in the External Sources page of the ReSharper options. For more information, see Navigating to Compiled Code.
Consider the following example:
After pressing Ctrl+Shift+T ReSharper opens the class that contains the declaration of the IProjectFile interface.
Note how this behavior differs from that of the Go To Declaration feature.