Coding Standard Manual
Coding Standard Manual
STANDARD
MANUAL
Change Log:
Example:
firstName, employees
Example:
Public string AFunction()
{
firstName, employees
. . . .
. . . .
}
CompanyName.TechnologyName[.Feature][.Design]
Example:
Akadia.Traffic, System.Web.UI, System.Windows.Forms,
Talibaan.Alkiada
Use nouns, noun phrases or occasionally adjective phrases with Pascal case.
Do not give class names a prefix (such as the letter C).
Example:
FileStream, XMLConverter, Patient, PatientCollection
Example:
IServiceProvider, IFormatable
Example:
Type GetType(string typeName)
string Format(string format, object[] args)
Example:
RemoveAll(), GetCharAt()
Example:
BackColor, NumberOfItems
Example:
Example:
AP_WIN_MIN_WIDTH, AP_WIN_MAX_WIDTH,
AP_WIN_MIN_HIGHT, AP_WIN_MAX_HIGHT
Control Prefix
Assembly asm
Button btn
CheckBox cbx
ComboBox cmb
Container ctr
DataColumn dcol
DataGrid dgrid
DataGridDateTimePickerColumn dgdtpc
DataGridTableStyle dgts
DataGridTextBoxColumn dgtbc
DataReader dreader
DataRow drow
DataSet dset
DataTable dtable
DateTime date
Dialog dialog
DialogResult dr
Exception ex
GroupBox gbx
HashTable htbl
ImageList iml
Label lbl
ListBox lbx
ListView lv
MarshallByRefObject rmt
Mainmenu mm
MenuItem mi
MDI-Frame frame
MDI-Sheet sheet
NumericUpDown nud
Panel pnl
PictureBox pbx
RadioButton rbtn
SDI-Form form
SqlCommand sqlcom
SqlCommandBuilder sqlcomb
SqlConnection sqlcon
SqlDataAdapter sqlda
StatusBar stb
StringBuilder strb
TabControl tabctrl
TabPage tabpage
TextBox tbx
ToolBar tbr
ToolBarButton tbb
Timer tmr
UserControl usr
WindowsPrincipal wpl
1. Coding Guidelines – General
SQL Queries: always write all SQL query strings in UPPER CASE
Comments:
2. Code Comment:-
Single line comment in source code format
Example:
Multiple lines
Example:
For(int j=0;j<=10;j++)
If()
}
Else
Final word:
Try to use all above standards, and make sure that one day you will adopt
them up to your DNA level, so that you will never need to refer this
document again.