读书人

C#代码 定名规范

发布时间: 2013-07-09 09:50:47 作者: rapoo

C#代码 命名规范

Pascal 大小写形式-所有单词第一个字母大写,其他字母小写。Camel  大小写形式-除了第一个单词,所有单词第一个字母大写,其他字母小写。  类名使用Pascal 大小写形式public class HelloWorld{ ...}   方法使用Pascal 大小写形式public class HelloWorld{ void SayHello(string name) {  ... }}  变量和方法参数使用Camel 大小写形式public class HelloWorld{ int totalCount = 0; void SayHello(string name) {  string fullMessage = "Hello " + name;  ... }} 

读书人网 >C#

热点推荐