Basic specifications Notes

1 specification purposes

  1. A software life cycle, 80% of the cost of that maintenance;
  2. Almost no software, throughout their life cycle, by the original developers to maintain;
  3. Coding standards can improve the readability of the software, allowing programmers and thoroughly understand the new code as soon as possible. For implementation of norms, every software developer must agree to comply with coding standards;
  4. The main reason to use Unicode standard is normalized such that the application structure and coding style, to facilitate reading and understanding of this code;
  5. Good source coding convention allows rigorous, readable and clear meaning, consistent with other language conventions and as intuitive as possible.

2 Examples

        

3 comments specification method

           ///<summary>

           /// Description: <Description of the method>

           ///</summary>

          /// <paramname = "<Parameter name>"> <Parameter> </ param>

          ///<returns>

          /// <description of the method returns the value of the note must specify the return value What is the meaning>

          ///</returns>

 Class 4 specification comments

          ///<summary>

         /// Property Description

         ///</summary>

5 single-line multi-line comments

         1, single-line comments. Format: // Change User Name

         2, multi-line comments. Format: / * ... * Change the user name /

6 Naming

        1.  To adopt mixed case, to improve the readability of the name. To distinguish between multiple words in an identifier, the identifier of the first letter of each word capitalized. Do not use an underscore as a separate written characters.

    There are two methods for writing, to adapt to different types of identifiers:

     1, PasalCasing: the first word identifier capitalization;

     2, camelCasing: the first word identifier lowercase.

         2. The   following table describes the different types of identifiers capitalization rules:

         

Guess you like

Origin www.cnblogs.com/arthuryao/p/11125459.html