var guidance
Closed this issue · 0 comments
Keboo commented
Currently there is not guidance in the docs around var. With C# 9, this also somewhat expands to target-typed new expressions as well.
Previously the only written guidance was in Tom's blog.
We believe there should be some additional guidance provided here as well:
Both of the following should be put in a "Variables" section under "Coding"
- CONSIDER using
varany time that the initialization of the variable clearly shows what the variable will contain. - CONSIDER using target-typed new expressions any time that the instance clearly shows its type.