编程规范:简易命名规则

2021-05-13  本文已影响0人  仙道喵喵

1 类名

采用大驼峰命名
如:public class Student

2 属性名

采用小驼峰命名
如:public string message { get; set; }

3 方法名/函数名

采用大驼峰命名
如:public void GetStudentInfo()

4 命名空间名

采用大驼峰命名
如:namespace SchoolManage

5 变量名

采用小驼峰命名
如:string userName="张三"

6 接口名

采用大写字母I+大驼峰命名
如:public interface IWeixin

上一篇 下一篇

猜你喜欢

热点阅读