Skip to content

Commit

Permalink
Update coding guidelines (dotnet#36428)
Browse files Browse the repository at this point in the history
* rearrange content

Make the new content organization follow better ordering.

* rewrite and update

Rewrite to match the docs team's accepted style.

* Edits to fix `var` issues

Fixes dotnet#26787: clarify "obvious"
Fixes dotnet#32633: add explanation, update variable names.
Fixes dotnet#34940: Explain that `var` is preferred in LINQ queries, despite other rules.

* Fix naming conventions

Fixes dotnet#30626: Clarify (again) that these are our guidelines, not yours. Point out that it's not the VS default, but a configuration option.
Fixes dotnet#30642: Again, our style.
Fixes dotnet#30799: Change constant style from ALL_CAPS to PascalCase to match runtime repo.
Fixes dotnet#33959: Update variable names so delegate types are PascalCased and instances of a delegate are camelCase. Add clarifying text for the same.

* Fix exception example

Fixes dotnet#31951 : Rewrite the exception example so that it's still obvious what can fail, but couldn't be easily anticipated before making the computation.

* Fixes dotnet#30897

Move the Generic type parameter naming conventions to the general naming conventions.

* Fix build warnings

* Reference runtime convention

The use of `_` and `s_` follow the runtime conventions. I'd missed that in the previous commit.

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

---------

Co-authored-by: David Pine <[email protected]>
  • Loading branch information
BillWagner and IEvangelist authored Jul 31, 2023
1 parent 7a94b2d commit 49d553f
Show file tree
Hide file tree
Showing 5 changed files with 422 additions and 379 deletions.
Loading

0 comments on commit 49d553f

Please sign in to comment.