[Tip: C # commenting] comment in C # For

Source: Internet
Author: User

There are three types of commenting syntax in C #:Multiline, single line, and XML.

XML documentation comments
In addition to providing code commenting, an XML documentation comment supports tools that extract comments into an external XML document. This XML can be consumed
By tools or run through XSLT style sheets to produce readable documentation. This is what Microsoft uses to document the. net fcl APIs that you see in the vs2008 help files.

The. net c # compiler has an option that reads the XML documentation comments and generates XML documentation from them.XML documentation is extracted to a separate
XML file that can then be processed by a tool for creating human-readable documentation.
Here's an example of a command line you can use to get the C # compiler to create an XML documentation file from XML documentation comments in a C # source code file:
CSC/DOC: programcomments. xml program. CS.

And you can also tell vs compiler to generate such XML file by project setting: Build-> output-> XML documentation file.

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.