forked from johnynek/brunet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CODING_STANDARD
44 lines (37 loc) · 1.65 KB
/
CODING_STANDARD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ACIS C# Coding Convention
1. Introduction
This guideline aims to be a note for coding in some specific cases instead
of a complete reference. Also, the convention listed here doesn't
necessarily comply with the recommendations from other C# convention
articles.
2. Indention
Use 2 Spaces instead of Tabs
3. Comments
1. Block (multiple lines starts with /** for /*) and C Style (/* */): general
descriptions and classes, methods descriptions
2. Single Line (//): recommended for commenting out code
3. Documentation: doxygen comments prefered. Use "///" to start a one line
comment, /** to start a multiple line documentation containing comment.
4. Declarations
{place holder}
5. Statements
{place holder}
6. Naming Conventions:
There are four formats used:
a. PascalCase: FirstLetterCapitalized
b. unix: all_lower_case_with_underscores_seperating_words
c. underscore: _unix_naming_with_a_leading_underscore
d. capitalized: UNIX_NAMING_WITH_CAPITAL_LETTERS
e. CamelCase: firstLetterLowerAllOthersUpper
1. Class/Namespaces/Methods/Properties: PascalCase (following the C#
standard library:
http://msdn2.microsoft.com/en-us/library/x2dbyw72(VS.71).aspx ).
2. Local variables: unix
3. Const and static readonly: capitalized
4. Instance and class variables: underscore
5. Method Parameters: CamelCase
6. Hungarian notations (i.e. strName) is generally considered deprecated but
still allowed here for some local variables.
7. New Lines and Braces
Braces shall start on the same line as the statement, expression,
declaration prior to its use.