Method description thingy...

A

almurph

Hi everyone,

I have a simple method inside a class in a solution. When I create an
object from the class I see the method signature appear in the drop
down - I'm sure you know what I mean.
My question is though how do I get a description to appear underneath
the method signature - just like a system method?
Can anyone help me please?

Al.
The puzzled.

**** Just a skeletal method ****

Public Function aMethod(ByVal str As String, ByVal num as Integer)

'Method body omitted

End Function
 
B

Bob Powell [MVP]

You need to create an XML documentation file for your objects.

VB doesn't support XML documentation natively if you're running under
VS2003. You can use an addin to create the XML documentation though. VS2005
enables you to add documentation by typing three apostrophes (''') on any
line. The system will then attempt to insetr a bare-bones XML comment for
your code.

You can specify in the project settings that the XML doc file should be
built. Once it's created you can place this in the same directory as the
binary file and intellisense will pick it up when the DLL is used.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
A

almurph

Pity - I though there is an easier way. Im using Visual Studio 2003. Ah
well - thanks though Bob.

Al.
 
H

Herfried K. Wagner [MVP]

I have a simple method inside a class in a solution. When I create an
object from the class I see the method signature appear in the drop
down - I'm sure you know what I mean.
My question is though how do I get a description to appear underneath
the method signature - just like a system method?

VS.NET 2002/2003:

Adding IntelliSense tooltips, XML comments, and documentation
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=tooltipsxmldocumentation&lang=en>

VS 2005:
**** Just a skeletal method ****

Public Function aMethod(ByVal str As String, ByVal num as Integer)

Simply type "'''" in front of the method declaration.
 
C

CMM

The VBCommenter power toy add-in for VS2003 is EXCELLENT, simple, light on
resourses, and even better than the built-in functionality in VS2005.
Download the stable 1.2.5. version:
http://www.gotdotnet.com/workspaces/workspace.aspx?id=112b5449-f702-46e2-87fa-86bdf39a17dd

It works just like it works in VS2005.... type ''' and voila.

Plus, unlike VS2005 it picks up on attributes you may have already applied
to your method or property or whatever (such as
ComponentModel.Description(...)).
 
C

CMM

While your product looks fine... why pay? The VBCommenter power toy add-in
does it for free. Coupled with (the also free and fantastic) NDoc, I can't
see your product being a compelling alternative in the slightest.
 
P

Peter Macej

While your product looks fine... why pay? The VBCommenter power toy add-in
does it for free. Coupled with (the also free and fantastic) NDoc, I can't
see your product being a compelling alternative in the slightest.

There's always reason for commercial products. If you are doing basic
things, free tools may be OK. Our VBdocman offers several additional
features:
1. All in one.
2. More output formats.
3. Redistributable command line tool that easily registers and
integrates your component documentation on user's machine during
installation.
4. WYSIWYG comment editor. You can visually place bold, italic,
underline, links, tables, pictures, lists and other things directly to
your XML comments. It allows you to insert complex code examples and
automatically escapes all dangerous XML characters.
5. While not perfect, it works as it should (unlike free tools). For
example see
http://groups.google.com/group/micr...nguages.vb/browse_frm/thread/bee456b3a499b6be
or
http://groups.google.com/group/micr...lpauthoring/browse_frm/thread/70c25ee4b401da6
6. Support for generics and partial classes (in the upcoming version
which will be released in a few days).
7. Conditional inclusion of members in resulting documentation, ability
to include source code, ability to document namespaces.
8. Recognizes @-style javadoc comments which is very important for teams
that ported their VB6 code to .NET.
9. Ability to use short numerical file names to avoid OS limit on path
length and more.
10. Support.
 
C

CMM

Great pitch!

Me personally I've always been an RTF + MSHelpWorkshop as oppossed to
Robohelp kind of guy (to use an old but applicable analogy).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top