XTab's Blog

Ged Mead's Blog at vbCity

This blog hosted by:
http://blogs.vbcity.com      
  Home :: Syndication  :: Login

AugSeptember 2006Oct
SMTWTFS
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

Archives

Topics

Ramblings

VB.NET

Tuesday, September 19, 2006 #

   Sometimes you might want to change all occurrences of a specific name in a project.   In earlier versions of VS.NET this would involve you in spending some time manually combing through code with the Find and Replace tool.   And handy though Find and Replace is, if you choose to Replace All it's easily fooled into replacing names and partial names that you didn't actually want changing.

   The 2005 Edition makes life much easier in this area, thanks to Symbolic Rename. When you want to impose a name change on, for example, a variable used throughout a project, all you have to do is right click on the name and select "Rename" from the context menu's choices.  Type in the replacement name and hit OK.   That's it.

   The new name will intelligently replace the old one appropriately in your code wherever the original variable name occurred.   This is a very smart feature that you can use to rename just about anything that a developer can assign a name to.   This includes the names of controls, procedures, classes and properties, for example.

   And if you have used the same name for, say, a class, plus several variables of different scope around the project, a collection, etc, Symbolic Rename isn't fazed a bit.   It only changes those occurrences of the name that are directly related to the element you selected.

   Fast and easy name change - and not a high priced lawyer in sight!

posted @ 2:39 AM