Q:

Introduce Constant in C# not working in Rider 18.3

I am trying to extract a variable as constant but the rider is not responding to the command:
class Clazz {
  public void Method()
  {
    return OtherMethod("SomeString");
  }
}

I am selecting "SomeString" and pressing ctrl+alt+C but nothing it happening. I tried changing the shortcut to crtl+alt+Q still not working. Am I doing something wrong?

A:

The "Introduce Constant" action in Rider was inherited from the IntelliJ IDEA platform (see 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

