Skip to content

Update coding standard for examples #358

Closed
@BillWagner

Description

@BillWagner

See #9 (comment)

Our coding style was optimized for the printed page. We've agreed to update the examples to follow a more consistent C# coding standard that uses whitespace to improve readability.

Much of the code is fine, but we will adopt the following updates:

  • Add a blank line between peer declarations. There is one exception to this rule: If a group of peer declarations all have empty bodies (e.g. class C {} or public void M() {}, then no blank line is added between them.
  • Different types of elements can be grouped without blank lines. When that's done, there should be a blank line between elements of different types. (e.g. all private fields can be declared without a blank line, but there should be a blank line between the group of private fields and method declarations).

We have discussed replacing the K&R style braces on methods with Allman style braces. We haven't made an affirmative decision on that.

Metadata

Metadata

Labels

type: clarityWhile not technically incorrect, the Standard is potentially confusing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions