An essential tool for. NET development programmers -- NDoc: a tool for creating code documents

Source: Internet
Author: User

Writing code documents is almost always a daunting task. What I'm talking about is not an early design document, or even a more detailed design document; what I'm talking about is various methods and attributes in the record class. The NDoc tool can use reflection to analyze the Assembly and automatically generate documentation for the code using the XML generated from the C # XML annotation. XML annotation is only applicable to C #, but there is a Visual Studio. NET Power Toy named VBCommenter, which can do similar work for Visual Basic. NET. In addition, the next version of Visual Studio supports XML annotations for more languages.

When using NDoc, you are still writing the technical documentation for the code, but you have completed the compilation of the documentation (in XML annotations) while writing the code, which is more tolerable. When using NDoc, the first step is to enable the XML annotation generation function for your assembly. Right-click the project, select Properties, Configuration Properties, and Build, and enter the path to save the XML File in the XML Documentation File option. When the project is generated, an XML file containing all XML annotations is created. In the NUnit example, a document is written in XML:



/// <Summary>
/// This test adds a number of values to the Hashtable collection
/// And then retrieves those values and checks if they match.
/// </Summary>
[Test]
Public void HashtableAddTest ()
{
// Method Body Here
}


XML documents about this method will be extracted and saved in the XML file, as shown below:



<Member name = "M: NUnitExample. HashtableTest. HashtableAddTest">
<Summary>
Related Article

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.