tags:

views:

43

answers:

4

I have .NET project using VS 2010 Pro, Some of the class name in App_Code is

  • products (products.cs)
  • commons (commons.cs)
  • members (members.cs)

I think it is not good naming convention,so i would to rename that, however, if i use search (products) and replace to (clsproducts) , it possible replace some text which is not the class,so is it any tool to do that?

+2  A: 

Just use the refactoring tools in VS. They work great :)

leppie
Is it this one?http://resourcerefactoring.codeplex.com/
SilverNight
NO!!! The builtin tools :) Right click on class name, select refactor, rename...
leppie
i see, thanks you very much!
SilverNight
+3  A: 

If you want to rename a class, just right click on it and select Rename..., that'll make sure that all references to it are renamed as well.

ho1
Yes~ it is good, so i can use the vs build-in function. thanks you.
SilverNight
A: 

There is a replace with preview option so unless your project is extremely large you can manually go through the list of changes and decide which ones to change.

Sruly
A: 

Changing filenames wouldn't be a problem. To rename a class name, just actually rename the class name in its deceleration statement, a red line would appear underneath it, hover your mouse pointer over it and click on Rename or Rename with Preview. It's gonna take care of everything, except if you have used some creepy smelly hard coded reflection techniques then it's gonna become a problem.

Hamid Nazari