Writing code documentation is almost always a daunting task. I'm not talking about early design documents, not even more detailed design documents; I'm talking about the methods and properties on the record class. The NDoc tool can use reflection to parse an assembly and automatically generate documentation for code using XML generated from C # XML annotations. XML annotations apply only to C #, but there is a visual Studio. NET power Toy named Vbcommenter that can do similar work for visual Basic. Net. In addition, the next version of Visual Studio will support XML annotations for more languages.
When you use NDoc, you're still writing technical documentation for your code, but you're writing the code to do the work (in XML annotations), which is easier to endure. When using NDoc, the first step is to open the XML annotation generation feature for your assembly. Right-click the item and select Properties | Configuration Properties | Build, and then in the XML documentation file option, enter the path to save the XML file. When the project is built, an XML file is created that contains all the XML annotations. The following is a way to write a document in XML in the NUnit example:
/// <summary>
/// This is 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 is here
}
The XML document data about the method is extracted and saved in an XML file, as follows:
< Member name = " m:nunitexample.hashtabletest.hashtableaddtest " >
< Summary > <