Following are naming conventions one should follow as best practice during the development of the application.
- We should use Pascal case for giving name to Classes. E.g. public class EmployeeDetails
- We should use Pascal case for method names E.g. int EmployeeSalary(int empId) { }
- We should use Camel case for declaring the variables. E.g. int totalSalary = 0;
- We should add the prefix “I” for giving name to interface with Camel Case E.g IEmployeeEntity
- We should not use Hungarian notation for declaring the variables instead we should use came casing. We should not use abbreviations also. E.g. string address and not string add
- We should avoid giving single character name for variable. E.g. i, n.
- We should avoid adding underscore for local or temporary variables.
Coding Guidlines - Naming Convention
Monday, September 14, 2009
Posted by Chirag at Monday, September 14, 2009
Labels: Coding Guidlines, Naming Convention
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment