Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I show Method description in the object.method popup? 1

Status
Not open for further replies.

MuadDubby

Programmer
Joined
Sep 23, 1999
Messages
236
Location
CA
Hello

I know there's a way to show a description for the method in the popup that shows up when you type the object.method.

Right now it only shows the mthod declaration (i.e. params and return value), but no description. It'll show a description for methods inherited from the .net base classes, but not for mine.

I once saw this done, and I'm sure it is something to be done in the '///' comment block. It's probably some sort of meta tag.

Any ideas?

Thx,
 
/// <summary>Your quick description</summary>
/// <param name="WindowWidth">The width of the viewing window</param>
/// <param name="WindowCenter">The location that specifies the centre of the viewable image</param>

public void MyMethod(int WindowWidth, int WindowCenter");
 
Thx bud, but that's not exactly what I was referring to.

When you type /// before the method declaration, you automatically get a comment skeleton that looks like yours (only without the actual details), and you can then fill it up.

That's all fine and dandy, but I'm looking for something more. If you declare an object of a class, and then type the object name followed by a period, you get the popup that shows a list of all the methods and properties it contains. If you scroll through the methods, for each one you get a second popup window that shows you the method declaration.

If the method was inherited from a .net base class, you'll also get a piece of text describing the purpose of the method (in the second popup window, right below the method declaration). But if you look at a method that you declared yourself in the class, all you get is the method declaration. No descriptive comment.

I know there's a way to get this comment in there by adding something to the /// block of comments, but can't find it. That's what I'm looking for.
 
Check this out...
Code Documentation in .NET

Try using ''' (3 single quotes). This will give you the comment structure. Just add your comments and they will appear from intellisense.

Sharing the best from my side...

--Prashant--
 
Ok, I did a bit more research on this, and it seems I am already doing the right things (although the results are off).

In order to get the Method's description show up in intellisense, I have to use the summary tag. And I'm doing that. Still, the comment doesn't show up.

Seems like this is a config issue. I'll keep on looking, but if you guys know where this gets changed, lemme know please.

Thx.
 
Allright, found it. You need to do two things:

1. Setup the xml documentation options (Project | Properties | Configuration Settings | XML Documentation File)
2. Rebuild the project
3. If this was a library, then you'll need remove and then re-add it's reference to the project that uses it so that the intellisense works 100%.

Thx all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top