zoukankan      html  css  js  c++  java
  • C Sharp Coding Standards

    Naming Conventions

    • “c” = camelCase
    • “P” = PascalCase
    • “_” = Prefix with _Underscore
    • “x” = Not Applicable.
    IdentifierPublicProtectedInternalPrivateNotes
    Project File P x x x Match Assembly & Namespace.
    Source File P x x x Match contained class.
    Other Files P x x x Apply where possible.
    Namespace P x x x Partial Project/Assembly match.
    Class or Struct P P P P Add suffix of subclass.
    Interface P P P P Prefix with a capital I.
    Generic Class 
    [C#v2+]
    P P P P Use T or K as Type identifier.
    Method P P P P Use a Verb or Verb-Object pair.
    Property P P P P Do not prefix with Get or Set.
    Field P P P _c Only use Private fields. 
    No Hungarian Notation!
    Constant P P P _c  
    Static Field P P P _c Only use Private fields.
    Enum P P P P Options are also PascalCase.
    Delegate P P P P  
    Event P P P P  
    Inline Variable x x x c Avoid single-character and enumerated names.
    Parameter x x x c  
  • 相关阅读:
    PHP chgrp() 函数
    PHP basename() 函数
    PHP 5 Filesystem 函数
    PHP rewinddir() 函数
    PHP readdir() 函数
    PHP opendir() 函数
    PHP getcwd() 函数
    PHP dir() 函数
    PHP closedir() 函数
    PHP chroot() 函数
  • 原文地址:https://www.cnblogs.com/hyb1/p/3046860.html
Copyright © 2011-2022 走看看