Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper: Rename all fields in the class

Tags:

c#

resharper

Possible duplicate: resharper-or-coderush-global-rename

The duplicated question was asked about 3 years ago. So I want to know if there is any way to rename all fields in the class rather than renaming them one at a time because I have about 500 fields in 20 classes ? It will take a lot of time renaming them one at a time.

For example:

public class Foo
{
    public static string field_One = "one";
    public static string field_Two = "two";

    /*and so on. About 500 fields */
}

I need this:

public class Foo
{
    public static string fieldOne = "one";
    public static string fieldTwo = "two";

    /*and so on. About 500 fields */
}
like image 474
andDaviD Avatar asked Jan 30 '26 18:01

andDaviD


1 Answers

Resharper 2017.1 now supports Bulk Rename features. The "Alt-Enter" Rename suggestion has a menu flyout that gives you additional options (rename in file, folder, etc).

like image 133
SwampyFox Avatar answered Feb 02 '26 08:02

SwampyFox