This content is not currently approved and is visible here for review only.

Library tutorials & articles

Object Library generators for .Net (NDoc)

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.

 

      Method and Tools used

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.

Comments

  1. 01 Jan 1999 at 00:00

    This thread is for discussions of Object Library generators for .Net (NDoc).

Leave a comment

Sign in or Join us (it's free).

Salman Zafar Sr. Technical Specialist in International Turnkey Systems,Telecom Unit
AddThis

Related podcasts

  • More jQuery in ASP.NET

    In this episode Chris Brandsma, Rick Strahl, Dave Ward, Bertrand Le Roy, and Scott Koon conclude their discussion of Microsoft's jQuery in ASP.NET announcement1.This episode of the Alt.NET Podcast is brought to you by LLBLGen Pro, the most mature O/R mapper and code generator out there.Are ...

Events coming up

  • Nov 18

    15 Minutes of Fame

    Dresher, United States

    This is a yearly tradition. We select 10 of the favorite speakers from monthly meetings, code camps, and hands on labs. Each one does a 15 minute talk on their favorite .NET technology. This is our 10th anniversary so we plan a gala event with special prizes and refreshments.

We'd love to hear what you think! Submit ideas or give us feedback