
1. Introduction
This document is specified for SWT’s developers who will attempt to a C# project development.
The developers should read this specification for standardization coding style and understandable
for other teammates. After all, it could make your project more standard and professional.
Note that, this document just specified with C# Language.
2. Coding Conventions
2.1. Terminology and Definition
Access Modifier C# keywords public, protected, internal, and private declare the allowed code-
accessibility of types and their members. Although default access modifiers vary, classes and
most other members use the default of private. Notable exceptions are interfaces and enumerate
which both default to public.
Camel Case: A word with the first letter lowercase, and the first letter of each subsequent word-
part capitalized. Example: customerNameAndThings
Pascal Case: A word with the first letter capitalized, and the first letter of each subsequent word-
part capitalized. Example: CustomerNameAndThings
Always : It must be follow this specification as a law.
Avoid: It should be avoid use this specification. In worst, it could be use.
Never: Every exceptions of this case is not allowed.
Possible: It recommend follow this specification.
2.2. Naming Conventions
“c” camelCase
“P” PascalCase
“U” UPPERCASE
“_” Prefix with “_”
2.3. Field
-Avoid using public field. (it’s not recommend of using public)
-Pascal Case if public or prefix with “_” and Pascal Case if access modifier is protected,
internal, private. Examples:
public string Name;
private int _Age;
-Any GUI controls could be named with PascalCase but it’s must be prefix with GUI type
(or abbreviate type). Example:
Control Name Prefix Example
Label lb lbLable
Button bt btButton
ListBox ls lsListBox
Smart World Technology Co. ltd.
Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam
Phone: 84-8-6674 9024 Fax: 84-8-6258 4459 Website: www.smartworld.com.vn
4