Coding Standard
Coding Standard
2
1.1. Definition specification................................................................................................................2
2. Identifier naming.................................................................................................................................3
2.1. Identifiers.....................................................................................................................................3
2.2. Local variables.............................................................................................................................3
2.3. Class members.............................................................................................................................3
2.4. Class properties...........................................................................................................................3
2.5. Interfaces.....................................................................................................................................4
3. Programming style...............................................................................................................................5
3.1. Array usage..................................................................................................................................5
3.2. Disposing.....................................................................................................................................5
1. Definitions
This section describes the naming definitions which are used to define naming styles in this document.
2.1. Identifiers
Do not use “_” in identifier naming if not necessary. Use capital letter instead:
DEFINITION: [a-zA-Z][a-zA-Z0-9]*
DEFINITION : [a-z][a-zA-Z0-9]*
DEFINITION : _[a-z][a-zA-Z0-9]*
DEFINITION : [A-Z][a-zA-Z0-9]*
CORRECT FORM: ClassPropertyName
2.5. Interfaces
Interfaces should be started with capital ”I” followed by a capital letter and should be continued with
one or more letters or numbers.
DEFINITION : I[A-Z][a-zA-Z0-9]*
3.2. Disposing
Always check if the used object implements the IDisposable interface and call it immediately if exists.
The better way is to use the “using” statement which automatically disposes the object after the code
exits from the object`s range.