Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CodingStandards_valid.docx
Скачиваний:
1
Добавлен:
13.11.2018
Размер:
44.07 Кб
Скачать

8. Indentation and Spacing

8.1. Use TAB for indentation. Do not use SPACES. Define the Tab size as 2

Do not place the code for the right border of the screen.

To transfer the code to next line if it is not located on the screen (in order to prevent scrolling)

8.2. Comments should be in the same level as the code (use the same level of indentation).

Good:

// Format a message and display

string fullMessage = "Hello " + name;

DateTime currentTime = DateTime.Now;

string message = fullMessage + ", the time is : " + currentTime.ToShortTimeString();

MessageBox.Show ( message );

8.3. Curly braces ( {} ) should be in the same level as the code outside the braces.

8.4. To make out a code according to the sample ExampleCode.cs

12

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]