Skip to main content

Inline constant value

PropertyValue
IdRR0127
Applicable Syntaxexpression that has constant value
Enabled by Default

Usage

Example #1

before.cs
public const string Value = "x";

void Foo()
{
string x = Value;
}
after.cs
public const string Value = "x";

void Foo()
{
string x = "x";
}

Configuration

roslynator_refactoring.inline_constant_value.enabled = true|false