Code guidline / code convention / naming convention for C#??

gicio

Well-known member
Joined
Aug 26, 2002
Messages
90
looking for something like a code guidline....

i.e. that a TextBox should have the prefix: txt


TextBox --> txt i.e. txtCustomer

Label --> lbl i.e. lblCustomer

String --> str i.e. strCustomer

bool --> boo i.e. booIsValide



is something like that anywhere available?




gicio
 
Doesnt really matter, as long as youre consistance. When I use C#,
I use camel case for everything (camelCase) where the first letter
is small. I dont use hungarian notation at all in C#.

isValid, customerName, cancelButton, are all kinds of things that I
personally use. However, I believe that in the MSDN there is a list
of the hungarian notation conventions. From the top of my head:

Form frm
TextBox txt
Label lbl
Scrollbars hsc/vsc
Slider sld
Panel pnl (?)
Picture pic
Button btn

For variables, I use (these are not necessarily "official"):
String s
Numbers (any kind) i
Boolean b
Char c
 

Similar threads

E
Replies
0
Views
220
Eric Jalbert
E
P
Replies
0
Views
95
Pradeep Kumar Mukherjee
P
Back
Top