Recommendation 133: Name private fields and local variables with camelcasing
Private variables and local variables are only responsible for this type, and they also adopt and open different methods of properties and fields in the naming scheme. Camelcasing is well suited for this type of naming.
The difference between camelcasing and pascalcasing is that its initials are lowercase. These two different naming conventions are used to make it easier for developers to differentiate them quickly. For example:
classPerson {Private stringFirstName; Private stringLastName; Public stringName {Get{return string. Format ("{0} {1}", FirstName, lastName); } } Private intDoSomething (intAintb) {intITemp =Ten; returnA + B +iTemp; } }
As we can see, all private fields, including the method's parameters and local variables, all follow the camecasing rules of the first letter lowercase. Once out of this rule, it is easy to confuse yourself during the coding process.
Turn from: 157 recommendations for writing high-quality code to improve C # programs Minjia
"Go" writing high-quality Code 157 recommendations for improving C # programs--Recommendation 133: Naming private fields and local variables with camelcasing