ReSharper 2020.2 Help

Navigate To Function Exits

ReSharper | Navigate | Navigate To | Function Exit(s)
Control+Shift+G | Function Exit(s)
ReSharper_NavigateToFunctionExits

This command provides you an easy way to navigate to exit points of a function. You can find this command if you invoke Navigate To on the name of a function, getter or setter of a property, the name of constructor, return and throw statements.

ReSharper treats return and throw statements as well as the closing bracket for functions with void return type as function exits.

If there is only one exit point, ReSharper navigates directly there. If there are several exit points, each of them is highlighted with blue.

Navigating to function exits

The highlights are also duplicated with %blue% markers on the marker bar on the right. Checking these markers may be helpful if not all highlights are visible on the current screen.
To navigate between the highlighted items, choose ReSharper | Find | Go to Next/Previous Highlight in the menu or press Control+Alt+PageDown / Control+Alt+PageUp. Alternatively, click the status indicator (that should be displaying ThemedIcon ErrorStripeFindNext Screen Gray png) in the right top corner of the editor to jump between the highlights.
When you finish examining the highlights, press Esc to remove them.

Note that by default, ReSharper automatically highlights all context exits when you set the caret at one of them.

ReSharper highlights context exits

If necessary, you can disable this by clearing the Highlight context exits checkbox on the Code Inspection | Settings page of ReSharper options.

This feature is supported in the following languages and technologies:

Language: C#Language: VB.NETLanguage: C++Language: HTMLLanguage: ASP.NETLanguage: RazorLanguage: JavaScriptLanguage: TypeScriptLanguage: CSSLanguage: XMLLanguage: XAMLLanguage: ResxLanguage: Build ScriptsLanguage: ProtobufLanguage: JSON
Feature is available in C#Feature is available in Visual Basic .NETFeature is not available in C++Feature is not available in HTMLFeature is not available in ASP.NETFeature is not available in RazorFeature is available in JavaScriptFeature is available in TypeScriptFeature is not available in CSSFeature is not available in XMLFeature is not available in XAMLFeature is not available in Resource filesFeature is not available in build script filesFeature is not available in ProtobufFeature is not available in JSON

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.

Last modified: 21 August 2020