As an updated answer ...
Update for Visual Studio 2017
In Visual Studio 2017, click a variable, and then press Ctrl + r, r . This works without problems (see the comments below about the differences in Visual Studio 2015, where the whole command had to be repeated).
Visual studio 2015
In Visual Studio 2015, if you click on a variable and use Ctrl + R, Ctrl + R , it will lock the variable name and select all instances of the variable. Then, when you start to enter a new variable name, it will rename all instances at once. Press "Enter" to exit when you are done (note: differences may exist between versions of updates. See Comments below).
Edit: one warning on this approach. If you use Razor in your views, it will not necessarily rename these variables. I did not make an empirical experiment to see if there are certain cases when he makes or does not select them, but I definitely had a few cases when he renamed more strongly typed variables in server code (DAL and controllers), but not views.
joshmcode Jun 24 '16 at 20:53 on 2016-06-24 20:53
source share