ReSharper 2016.2 Help

Refactor This

ReSharper | Refactor | Refactor This…
Ctrl+Shift+R
ReSharper_RefactorThis

This command is a shortcut to all ReSharper's refactorings available in the current context. You can invoke this command from almost any place in Visual Studio:

  • On the declaration or usage of a symbol in the editor.
  • On the selection in the editor.
  • On the current item or selection in the Solution Explorer, Class View, or Object Browser.
  • On the current item or selection in the File Structure Window, type dependency diagram, or another ReSharper tool window.

Depending on the context, the drop-down list includes available refactorings.

To view and apply contextually available refactorings

  1. Place the caret on a symbol in the editor or select the symbol in a tool window.
  2. Press Ctrl+Shift+R or choose ReSharper | Refactor | Refactor This… in the main menu .
  3. The Refactor This drop-down list appears.
    Refactor This list
  4. Choose an item from the list and click on it or press Enter.

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 Feature not 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.

Last modified: 15 December 2016