ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Go to Declaration

Last modified: 23 September 2024

Use this command to navigate to the declaration of a symbol from any symbol usage. You can invoke this command from the Solution Explorer, File Structure window, and other tool windows.

To navigate in the opposite direction (symbol usages) you can invoke the Go to Declaration command when you are already on the symbol declaration, or you can use the Go to Usages of Symbol command.

By default, Go To Declaration works with Ctrl + left-click and with the middle button click. To disable this, clear the Rich mouse navigation in the editor checkbox on the Environment | Search & Navigation page of ReSharper options Alt+R, O. You can also Ctrl+Shift-click usages of symbols to display their declarations in the Peek Definition view. If you want to disable this, clear the Use Ctrl+Shift click to open the result in the peek view checkbox.

If the item you navigate to belongs to the current solution, ReSharper opens the corresponding file in the editor and places the caret at the symbol declaration. If it is in referenced libraries, ReSharper navigates according to the settings defined on the Tools | External Sources page of ReSharper options Alt+R, O.

This feature is supported in the following languages and technologies:

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 Languages and frameworks section.