| layout | page |
|---|---|
| title | CC0021 |
| tagline | NameOfAnalyzer |
|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.
{% highlight csharp %} void Foo(string b) { var whatever = "b"; } {% endhighlight %}
A code fix will be presented to you that will transform the code:
{% highlight csharp %} void Foo(string b) { var whatever = nameof(b); } {% endhighlight %}

None
TBD