TypeName | NameOfAnalyzer |
Check Id | CC0021 |
Category | Design |
Severity | Warning |
In C#6 the nameof() operator should be used to specify the name of a program element instead of a string literal as it produce code that is easier to refactor.
void Foo(string b)
{
var whatever = "b";
}
A code fix will be presented to you that will transform the code:
void Foo(string b)
{
var whatever = nameof(b);
}
None
TBD