c# - Resharper:重命名类中的所有字段

标签 c# resharper

可能重复: resharper-or-coderush-global-rename

大约 3 年前提出了重复的问题。所以我想知道是否有任何方法可以重命名类中的所有字段而不是一次重命名它们,因为我在 20 个类中有大约 500 个字段?一次重命名它们会花费很多时间。

例如:

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

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

我需要这个:

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

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

最佳答案

Resharper 2017.1 现在支持批量重命名功能。 “Alt-Enter”重命名建议有一个弹出菜单,可为您提供更多选项(在文件、文件夹等中重命名)。

关于c# - Resharper:重命名类中的所有字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14317293/

相关文章:

c# - 获取程序集中的类型(错误 : System. Reflection.ReflectionTypeLoadException)

c# - ReSharper Alt-Enter 在某些项目中不起作用,但在其他项目中起作用

c# - 删除和退格在 ReSharper 中不起作用

visual-studio - 为什么我应该从 ReSharper 切换到 CodeRush?

javascript - 如何将 HttpResponseMessage 的 ByteArrayContent 下载为 zip

c# - Lucene RangeQuery 过滤不当

c# - 无法创建与 sqlite 数据库的连接

c# - ReactiveUI:为什么在使用 TestScheduler 时必须在 "...Throttle..."中明确指定调度程序

visual-studio - 在 Resharper 中跳出右括号的最佳做法是什么?

unit-testing - 我的单元测试的ReSharper Gutter图标没有显示