Descriptive Intellisense?

  • Thread starter Thread starter Manish Jain
  • Start date Start date
M

Manish Jain

Platform : Asp.Net/C#, Framework 1.1
--------------------------------------------

I have many overloads of constructors/other methods in most of my classes.
I want to provide some descriptive help when people cosume such classes,
just like MS does say when I say :

new DataSet(
and I get a list of constructors, along with a description of constructor,
and paramter in the second line.

The kind of comments I have right now are:

/// <summary>
/// This Constructor is to be used when a new Stage is being created
/// </summary>
/// <param name="ownerid">Owner ID</param>
/// <param name="stageid">Stage Identifier, Not recycled for an
owner</param>
/// <param name="processid">Process Identifier, recycle for each
Owner</param>

public ProcessStageInfo(int ownerid, int stageid, int processid)
{//......}

Can somebody suggest how this is possible? Basically what I want to know is
how to get the descriptive second line after the constructor list.

Manish
 
Manish,
Figured it out!! :DD Try typing three "/"'s just before each overloaded
function/method. It should autmatically create a short XML Documentation
block of code in which you can decribe each parameter, etc. Check out the
following code:

private void button1_Click(object sender, System.EventArgs e)
{
MyFunc(<Descriptive Intellisense shows up here>
}

/// <summary>
/// This is the First one
/// </summary>
/// <param name="Counter">Integer to Count how many there are</param>
/// <param name="Quickness">String to describe how quickly it is</param>
private void MyFunc(Int32 Counter, String Quickness)
{
MessageBox.Show("This is the First One");
}

/// <summary>
/// This is the Second one
/// </summary>
/// <param name="Counter">How many there are</param>
private void MyFunc(Int32 Counter)
{
MessageBox.Show("This is the Second One")'
}

Let me know how you go.

Rob Manger
(e-mail address removed)
 
Back
Top