Written so long program code, found that a lot of people's code is not standard. In particular, when several people collaborate to develop a project, some people write class names, variable names, methods, and so can not understand the whole project will be able to complete the combination. I think I wrote the code has been very good, at least to see the meaning of the name. However, after reading these 9, I think I have to learn more ...
1. Local variable name to be meaningful, as far as possible with the corresponding English name, such as "User name" variable, do not use AA bb cc, etc. to name, but to use username.
2. Do not use a single letter of variables, such as I, N, X, and so on. and to use index, temp and so on. The variable exception for the loop iteration.
3. Pascal nomenclature should be used to name the method name, attribute name, class name, and namespace, and the method name is generally named as the verb-object phrase, as
ShowDialog ();
CreateFile ();
GetPath ();
4. Name The local variables and the parameters of the method using the Camel naming method.
The above several comprehensive examples are as follows
public class Neeke
{public
Neeke ()
{
}
private string neekename;
public string Neekename
{get
{return neekename;}
set {neekename = value;}
Public
void CallMe ()
{
System.Console.WriteLine ("Hello neeke!");
}
}