Since using type inferrence for constructors has been possible using new(), it's more concise to use:
Thing thing = new();
than
var thing = new Thing();
It would be nice if this could be applied as a suggestion.
Languages applicable:
I think only C#. I don't use other .Net languages, but it should apply to all it can I guess.
Brief description:
Since using type inferrence for constructors has been possible using
new()
, it's more concise to use:Thing thing = new();
thanvar thing = new Thing();
It would be nice if this could be applied as a suggestion.Languages applicable:
I think only C#. I don't use other .Net languages, but it should apply to all it can I guess.
Code example that the analyzer should report:
Explained above.
Additional information:
Is any needed?
Documentation requirements:
When this analyzer is implemented, it must be documented by following the steps at Documentation for IDE CodeStyle analyzers.