A comprehensive coding standard is essential for a successful product delivery. The standard helps in enforcing best practices and avoiding pitfalls, and makes knowledge dissemination across the team easier. The C# coding standard presented here is very thin on the “why” and very detailed on the “what” and the “how.” The coding standard presented next captures best practices, dos and don'ts, pitfalls, guidelines, and recommendations, as well as naming conventions and styles, project settings and structure, and framework-specific guidelines. 

 

 

Other Artical : Coding Standards in .NET : Naming Guidelines

 

Other Article : Coding Practices in .NET

 

 

Prefix to be attach to follow coding standards in C# .NET

 

1.    C# Primitive Type Notation

Sbyte

sy

short  

s

int    

i

long   

l

byte   

y

ushort 

us

uint   

ui

ulong  

ul

float  

f

double 

d

decimal

dec

bool   

b

char   

c

 

2.    Visual Control Type Notation

Assembly                      

asm

Boolean                   

bln

Button                   

btn

Char                    

ch

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

Double                     

dbl

Exception                 

ex

GroupBox                      

gbx

HashTable                     

htbl

ImageList                 

iml

Integer                   

int

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

String                     

str

StringBuilder            

strb

TabControl                

tabctrl

TabPage                  

tabpage

TextBox                 

txt

ToolBar                   

tbr

ToolBarButton               

tbb

Timer                  

tmr

UserControl          

usr

WindowsPrincipal     

wpl

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5