- 2 minutes to read
Renames a symbol and updates all references to it. This refactoring runs the Visual Studio's Rename quick action.
Available when the caret is in a symbol declaration.
Place the caret in a code symbol (a field, local variable, method, namespace, property, or a type).
The blinking cursor shows the caret's position at which the Refactoring is available.
Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.
Select Rename from the menu and press Enter.
In the code editor, type the new symbol name. Press Enter or click Apply in the Rename hint to save the change.
After execution, this refactoring changes the symbol name and updates all references to it.