进入到实质的第三章了,命名规范。

书中和我的观点一样,命名规范重要性怎么强调都不过分。为什么呢,因为它是与人的接口。

1, PascalCasting 用于由多个单词构成的名字空间、类型以及成员的名字。
     如 System.Security { ......}
          public class StreamReader {.......}
          public interface IEnumerable {.....}
          public virtual string ToString();        
    
     camelCasting 用于参数的名字。
     如 public static int ToInt32 (string value)
     
      不要使用下划线。
    
      PascalCasting 就是每个单词首字母都大写 ,如果首字母是缩写词如IOStream就要如此两个字母都大写
     camelCasting 就是除了第一个单词每个单词首字母大写。如果是缩写词开始缩写字母要小写如ioStream

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2022-01-11
  • 2021-10-23
  • 2022-12-23
  • 2021-10-26
猜你喜欢
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2021-10-19
  • 2021-09-21
相关资源
相似解决方案