coderushforroslyn-116895-refactoring-assistance-rename.md
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).
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.
static void Main(string[] args) {
Console.Write("Mass (kg): ");
double mass = Convert.ToDouble(Console.ReadLine());
Console.WriteLine($"F = {mass * 9.807} N");
Console.ReadLine();
}
Sub Main()
Console.Write("Mass (kg): ")
Dim mass As Double = Convert.ToDouble(Console.ReadLine())
Console.WriteLine("F = {0} N", mass * 9.807)
Console.ReadLine()
End Sub