Skip to content

var guidance #141

Description

@Keboo

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 var any 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationgood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions