Zananok
Zananok

Reputation: 121

How to rename variables on the fly with Visual Studio 2015?

There were so many videos showing off the new "advanced" and "smart" renaming of variables for languagues like C# in VS 2015 (Win 10), like here (under "Renaming improvements"), but for me it doesn't work.

I have ReSharper extension, but I would assume that it should not in any way affect the new renaming features.

Do I have to activate something on preferences? I have been searching everywhere to activate this.

Upvotes: 2

Views: 2813

Answers (2)

Chris N
Chris N

Reputation: 21

Once you left click and choose Rename a dialog will pop up. Start changing the text and the variable will be renamed to what you want.

Once you are done, click on apply.

Upvotes: 2

user007
user007

Reputation: 1730

  1. Select the variable
  2. Press CTRL + SHIFT + R
  3. Press CTRL + R or choose the Rename option in the context menu
  4. As you change the variable name, you may see the variable references in the whole file/project/solution gets changed.

Upvotes: 0

Related Questions