1. File Header comment
////// Author: crayon /// founding Date: 2013-08-20 // modifier: banana /// modification time: // modifier: nana // modification time: // Description: // mainly used for product information input ,... ///
Module notes:
///// Module No.: <module No., which can be referenced in system design> // role: <description of this class, can reference the description in the system design> // Author: Chinese name // write date: <module creation date, format: YYYY-MM-DD> ///
If the module has been modified, the following notes must be added for each modification:
///// Log No.: <span> NO., added once from 1> // modify Description: <description of the change> /// Author: modifier Chinese name // modify Date: <module modify date, format: YYYY-MM-DD> ///
2. Class property Annotation
////// Attribute description ///
3. Method comments
/// <Summary> /// method description /// </Summary>
4. Comments between codes
Comments between codes can be divided into single-line comments and multi-line comments:
Single line comment:
// <Single line comment>
Multi-line comment:
/* Multi-line comment 1 multi-line comment 2 multi-line comment 3 */
You must add comments (if, for, foreach,…) when encountering statement blocks in the code ,......), The added comments must be able to describe the functions and implementation methods of this statement block (the algorithms used, and so on ).
Block annotations should adopt the following style:
/* Line 1 * Line 2 * Line 3 */
/// XML Annotation
To generate API documents conveniently, XML standards must be standardized.
. Net generate API documentation (reprinted)
Http://blog.csdn.net/chtnj/article/details/8278342
Http://blog.csdn.net/chtnj/article/details/8278360