This resource has not currently been approved, and is not currently linked to from our directory of resources. It is being displayed here for preview by the author and moderators only.
Method for C#.NET
Microsoft Visual Studio.Net provides a facility to document your code and generate help object library. To do so, go to tools and select build comment web pages. A new dialog window will open and after selecting appropriate window press OK and html help object library will be generated. But it doesn’t achieve our goal fully because in this kind of help we don’t have any facility to search for classes, methods and properties etc. Further more this built in facility is only available for C#.Net and not for Vb.Net.
So after some research, we found some help and object library generators for .Net. Pros and cons of some of them have been added in appendix for further references.
In order to achieve to achieve our goal to use one generic method for both Vb.net and C#.net we used NDoc 1.3.1 - Code Documentation Generator for .NET along with a plug-in called VBCommenter. This plug is used to add similar functionality which is provided by VS.Net for C#.Net.
Method for C#.Net
NDoc generates the help file using a XML file. Let’s have an example and this will help to understand it further more.
Open the project for which code documentation is required.
Then go to Solution Property Page and click on configuration properties and enter the name of xml for ‘Xml Documentation File’ and press Ok. As shown in figure 1.
Example
If we have a class
/// <summary>
/// Summary description for Class1.
/// </summary>
/// <remarks></remarks>
public
class Class1
{
/// <summary>
/// Constructor
/// </summary>
/// <remarks></remarks>
public Class1(){}
/// <summary>
/// Method
/// </summary>
/// <param name="str"></param>
/// <remarks></remarks>
public
checking(){}
}
To get the red text above in you class header, method header, property header, interface header, member etc, press /// and enter. Text mentioned above in red will appear in a block and you can fill the tags accordingly.
When you will run the project or build it, an XML file will be generated in bin folder every time project is build. That is one of the requirement of Ndoc in order to generate help Documentation. Second requirement is project exe file or assembly file.