1.命名规则 1.起始位为字母(大小写)或下划线('_') 2.其他部分为字母(大小写).下划线('_')或数字(0-9) 3.大小写敏感 2.先体验一把: #Ask the user their name name = input("Enter your name: ") #Make the first letter of their name upper case #and the rest of the name lower case #and then print it pri
(1)类名.属性名.方法名采用Pascal命名,如 class User { } interface IEditable { } bool ValidateInput() public int Age { get; set; } (2)方法体参数和内部变量采用Camel命名,如 bool ValidateInput(User user) { int userAge = 0; return user.Age > userAge; } (3)项目私有成员采用下划线命名,如: class User {