Programming specifications play an important role in improving the readability of programs. Following certain specifications when programming can make algorithms easier to understand and make it easier for programmers to understand and communicate.
Naming principles and habits:
Two methods: Pascal case and Camel case.
Parameters, objects and controls are generally named in Camel case, and others are named in Pascal case.
For example: int GetValue(string strValue) The method name GetValue adopts Pascal case, and the parameter name strValue adopts Camel case.
The names of parameters, objects, and controls should be descriptive, and the name structure is "type + purpose".
For example: intAge strName lblAge btnLogin
method uses verbs, attributes use nouns, event handlers: 1. Use verbs with tense concepts 2. Add the suffix EventHandler
For example: public delegate void MouseEventHandler(object sender, MouseEvent e);
It is recommended to use a double-layer structure of company name and project name for the namespace.
namespace CompanyName.Sales //Equivalent to a two-level namespace in nested mode. If it is plural, use the plural form Sales instead of Sale.
{
public class Customer () //No prefixes, underscores, abbreviations should be the same as the namespace
{
}
}
http://www.cnblogs.com/andymore/archive/2006/10/04/521368.html