Skip to content

C# Style Guide

Kirill Taran edited this page Apr 3, 2024 · 1 revision

C# Style Guide

By default we follow Common C# code conventions. This document overrides the convention.

1. File Layout

1.1 DO use one file per class regardless its size. The only exception is a nested class.

1.2 DO use file-scoped layouts

1.3 DO place private variables at the bottom of the class.

1.4 DO use two blank lines between methods. DO use one blank line to divide logical parts within a method.

2. Methods

3. Variables

4. Operators

5. Other

5.1 DO start to-do comments with "// TODO: " and end it with a dot. The content of the comment must answer the questions on what, when and if possible how this to-do will be done.

Clone this wiki locally