JetBrains Rider 2021.1 Help

Refactorings for Visual Basic .NET

In Visual Basic .NET, JetBrains Rider supports the Main Set of Refactorings with the single exception of the Convert Anonymous to Named Type refactoring.

Perform a refactoring

  1. Set your caret at a symbol, select a code fragment that you want to refactor, or select an item in a tool window.

  2. Do one of the following:

    • In the main menu, choose %refactorMenu%, and then select a desired refactoring. The list of refactorings available in this menu depends on the current context. If JetBrains Rider cannot suggest any refactorings for the context, the entire menu is disabled.

    • In the main menu, choose  %refactorMenu% | Refactor This, or press Ctrl+Alt+Shift+T to display the list of applicable refactorings, then select one of them. You can also choose Refactor This in the context menu of a selection.

    • Use default keyboard shortcuts (Windows, Linux/ (macOs) assigned to specific refactorings, or assign custom shortcuts to your favorite refactoring commands.

  3. If the selected refactoring requires user input, the refactoring wizard opens. Note that the wizard's dialogs are not modal, so you can edit the code while the wizard is open.

  4. If a refactoring operation would cause code conflicts (such as duplicate names, visibility conflicts, and so on), the wizard displays the list of conflicts on the last step, before you apply the refactoring. For some conflicts, the wizard can also suggest quick-fixes. For more information, see Resolve Conflicts in Refactorings.

  5. Right after the refactoring has been completed, all changes that it makes anywhere, including other files, are registered as a single operation. So you can use the Undo action Ctrl+Z to roll back all these changes with a single keystroke.

Some refactorings are available immediately after you modify code in the editor. For more information, see Inplace Refactorings

Last modified: 08 March 2021