在 C# 中引入常数在 Rider 18.3 中不起作用

Introduce Constant in C# not working in Rider 18.3

我正在尝试提取一个变量作为常量,但骑手没有响应命令:

class Clazz {
  public void Method()
  {
    return OtherMethod("SomeString");
  }
}

我正在选择 "SomeString" 并按 ctrl+alt+C 但没有任何反应。我尝试将快捷方式更改为 crtl+alt+Q 仍然无效。我做错了什么吗?

Rider中的"Introduce Constant"动作继承自IntelliJ IDEA平台(见https://www.jetbrains.com/help/idea/extract-constant.html). Currently (in Rider 2018.3), it's just not supported for C#. I created the corresponding issue in the Rider issue tracker: https://youtrack.jetbrains.com/issue/RIDER-25847