Reputation: 14108
If you have written a sourcecode with 10 000 row in C# and you need to change the variable's name candy into candies and the word candy is located in different position in the same class. I wanna to change the name of the variable being located in different places only one time.
Is there a plugin or tool for Visual studio or a functionality in VS2010?
Upvotes: 1
Views: 11116
Reputation: 6890
Hit Control + Shift + H
set what you want to change and select Replace All
.
Also you can right click over a variable and choose Refactor -> Rename
Upvotes: 4
Reputation: 329
1. Change your variable name
2. Click on the red rectangle
3. Click on the picture
4. Click on rename "MyVariable" in "MyVariable1"
Upvotes: 4
Reputation: 16199
If you understand you correctly, you simply need to right-click the variable: Refactor -> Rename...
.
Upvotes: 5
Reputation: 1093
You could use CodeRush Xpress, a free tool by DevExpress that allows easy variable\class\method renaming and has lots of other features. Grab it here: http://devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/
Upvotes: 0
Reputation: 22984
You can right click on the variable and choose Refactor->Rename from the menu, it's the most save way to accomplish it.
for vb.net it's Rename directly...
Upvotes: 1
Reputation: 12346
Yes, there is built-in functionality. Change the name of the variable in its declaration line and a popup button will appear right next to it. Click it and choose Rename 'candy' to 'candies'. This will perform full rename wherever the variable is used.
Upvotes: 1