C # code annotation specification. Net generate API documentation

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.