首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

C#代码 定名规范

2013-07-09 
C#代码 命名规范Pascal 大小写形式-所有单词第一个字母大写,其他字母小写。Camel大小写形式-除了第一个单词

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;  ... }} 

热点排行