ReSharper 2025.1 Help

Navigate to containing declaration

When your caret is anywhere in the body of a type or a function, you can jump to the declaration of that type or function with a single shortcut.

Go to containing declaration

  1. Place the caret anywhere in the body of a type or a function.

  2. Press Control+[ or choose ReSharper | Navigate | Containing Declaration 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. ReSharper will place the caret to the declaration of the type or function.

  4. If the type or function is declared within another type, you can repeat step two to navigate to the declaration of the containing type.

This feature is supported in the following languages and technologies:

Language: C#

Language: VB.NET

Language: C++

Language: ASP.NET

Language: Razor

Language: XAML

Language: Resx

Language: Build Scripts

Feature is available in C#

Feature is available in Visual Basic

Feature is available in C++

Feature is available in ASP.NET

Feature is available in Razor

Feature is available in XAML

Feature is not available in Resource files

Feature is not available in build script files

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.

Last modified: 23 September 2024