| layout | page |
|---|---|
| title | CC0005 |
| tagline | EmptyObjectInitializerAnalyzer |
|TypeName| EmptyObjectInitializerAnalyzer | |Check Id | CC0005 | |Category | Style | |Severity | Warning |
An empty object initializer doesn't add any information and only clutter the code. If there is no member to initialize, prefer using the standard constructor syntax.
{% highlight csharp %} var a = new A() { }; {% endhighlight %}
A code fix will be presented to you that will transform the code:
{% highlight csharp %} var a = new A(); {% endhighlight %}

None
TBD