Help file from XML Documentation using NDoc

In this article we will explore the usage of Open Source tool NDoc to create
MSDN type help file from the xml documentation in a DotNet assembly.

To know how we can create XML documentation visit the link
XML Documentation in Visual Studio using GhostDoc

Ndoc basically uses two sources to generate documentation.
One is assembly file and second is pre generated XML documentation file which we can generate Visual studio in the following way:
Go to the options in Visual studio and there we have an option to specify the path where the studio will place the file.

Now Ndoc simple exe which takes the path of Assembly and the Xml document file as generated in prevoius step and it automatically creates a CHM or web bases help file.

kick it on DotNetKicks.com

Shout it

pimp it

XML Documentation in Visual Studio using GhostDoc

In this article we will explore how to generate the xml documentation in Visual Studio for our .NET code.

Basically Every .NET assembly can contain the comments as documentation which we place after ‘///'(Triple slash) in our code.

For example:
If we write the following code in visual studio it gets assigned into assembly as xml documentation:

    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        ///XML Comment
        ///Can be used to generate a document 
        ///using tools like NDoc
     }
     

Now there exists a wonderful tool GhostDoc which can automate this documentation for you. It basically extracts the documentation from the documentation of the original classes embeds it into the code.

The documentation for the page load method in the above example changed with the help of GhostDoc like this:

/// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    /// *************************************************************
    /// Created By: Ankit Goyal
    /// Date: 5/22/2009
    /// Time: 12:06 PM
    /// *************************************************************
    protected void Page_Load(object sender, EventArgs e)
    {   
    }
    

The quality of documentation which GhostDoc generates also depends on the names of classes method and variables you create. Conventions if followed along with GhostDoc produces superb documentation at ease.

Now once the xml documention has been embedded into the code it can be used to create msdn type help file for the code. To know about it please visit:
Help file from XML Documentation using NDoc

References:
Ghostdoc Home Page

kick it on DotNetKicks.com

Shout it

pimp it

Query to get a particular row in Sql Server 2005

In this article we will look into how to write a sql query to get a particular row in sql.

Lets write the code to find 2nd row in a table named mcc_measures.

So first we declare a temporary table

declare @temp table (id int) 

No in this temp table we insertrow numbers of the table

insert into @temp(id)

SELECT 
ROW_NUMBER() over(ORDER BY Measure_Id DESC)
FROM 
mcc_measures

Now from the temp table we select the row where rowid=2 as required

SELECT
*
FROM
@temp
WHERE
id = 2

kick it on DotNetKicks.com

Shout it

pimp it