Code Conventions

As a general rule, follow the coding conventions that are already in place on the file you are editing. Here are some general recommendations:

We follow the coding conventions described in this document, with the following exceptions:

  • Opening braces are on the same line as the statement that begins the block.
  • It is OK to omit the braces for single-line conditionals, including the else block, as long as both are only one statement each.
  • Using directives appear before the namespace, not inside it.
  • Private fields are prefixed with an underscore and camel-cased.