Overload Comments or something?

Nate Bross

Contributor
Joined
Apr 6, 2005
Messages
601
Location
Chicago, IL
I was just wondering if there is a way to put information in the tool tip that appears when you are typing the param list for an overloaded method when you are the one writing the overloaded method.

eg.

C#:
        public void Move(Point pos)
        {
            iSpriteX = pos.X;
            iSpriteY = pos.Y;
        }

        public void Move()
        {
            Move(new Point(iSpriteX + iSpeedX, iSpriteY + iSpeedY));
        }

Is there a way to put a description of the variable at the bottom of the tooltip, as seen in most .NET overloads?
 
Assuming you mean what I think this can be achieved by typing three slashes (///) before a method... this will automatically make the following appear.
C#:
/// <summary>
/// What method does
/// </summary>
/// <param name="myParam">What parameter is</param>
/// <returns>what the method returns</returns>
public string MyMethod(string myParam)
{
}
 
These are called code comments. Code comments are compiled into an XML file, in the same format as the tool tips for the .Net framework.
 
In VS2005 you can now use ''' the same way /// is used in C#.

If you're using VS2003, you need to use an external tool, either a VS add-in or VBCommentor

Don't forget that you can also use NDoc to createa sweet looking API for your libraries if you want to as well.
 
Back
Top