Wednesday, March 19, 2008

Naming Conventions and Standards

1. Use Pascal casing for Class names
2. Use Pascal casing for Method names
3. Use Camel casing for variables and method parameters
4. Use the prefix “I” with Camel Casing for interfaces
5. Do not use Hungarian notation to name variables.
6. Use Meaningful, descriptive words to name variables. Do not use abbreviations.
7. Do not use single character variable names like a, b, c etc. Use names like address, Name, Servername...
8. Do not use variable names that resemble keywords.
9. Use appropriate prefix for the UI elements so that you can identify them from the rest of the variables
10. Use appropriate prefix for each of the ui element. A brief list is given below. Since .NET has given several controls, you may have to arrive at a complete list of standard prefixes for each of the controls (including third party controls) you are using.
for examples...

Control Prefix
Lable Lbl
TextBox txt
Combox cbo
Command Button Cmd
ListBox lst
CheckBox Chk
Option button Opt
Table tbl

.....

No comments: