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>