Home All Groups Group Topic Archive Search About

Parameter description

Author
15 Jun 2006 5:47 PM
Quinn
If I have a procedure like

Sub SUB1 (i as integer, s as string)
end sub


how do I write some descriptions for i and s? that way when I call Sub1
there will be a pop toothtip to describe what i and s is.


Thank you.

Author
15 Jun 2006 6:44 PM
Ahmed
Hi,

In VS.NET 2005, after you declare:
Sub SUB1 (i as integer, s as string)
end sub

type ''' a line before the signiture

and you will get the following:

   ''' <summary>
    '''
    ''' </summary>
    ''' <param name="i"></param>
    ''' <param name="s"></param>
    ''' <remarks></remarks>
Sub SUB1 (i as integer, s as string)
end sub


You can type the description for i and s between the >< (ie <param
name="i">i is an integer, does so and so</param>

If you are using VS 2003 I believe you need to download VB commenter.

Cheers,

Ahmed
Show quoteHide quote
>
Quinn wrote:
> If I have a procedure like
>
> Sub SUB1 (i as integer, s as string)
> end sub
>
>
> how do I write some descriptions for i and s? that way when I call Sub1
> there will be a pop toothtip to describe what i and s is.
>
>
> Thank you.
Author
15 Jun 2006 7:48 PM
zacks
Ahmed wrote:
Show quoteHide quote
> Hi,
>
> In VS.NET 2005, after you declare:
> Sub SUB1 (i as integer, s as string)
>  end sub
>
> type ''' a line before the signiture
>
> and you will get the following:
>
>    ''' <summary>
>     '''
>     ''' </summary>
>     ''' <param name="i"></param>
>     ''' <param name="s"></param>
>     ''' <remarks></remarks>
> Sub SUB1 (i as integer, s as string)
>  end sub
>
>
> You can type the description for i and s between the >< (ie <param
> name="i">i is an integer, does so and so</param>
>
> If you are using VS 2003 I believe you need to download VB commenter.

So this is how you provide Intellisense with info about your function,
eh? Just what is this technique referred to so I can look it up in the
help?
Author
15 Jun 2006 8:08 PM
Ahmed
Yes, this is how you IIntellisense with info about your function. These
info will show up in the Object Browser as well. This is a method I
just created for illustration and this is how it shows in the Object
Browser.:

Public Sub testing(ByVal x As String, ByVal y As String)
     Member of: WindowsApplication6.Form1
Summary:
This method does this and that...etc.

Parameters:
x: x is a string. blah blah blah
y: X is a String. Blah blah blah

Remarks:
There is a limitation. This method throws and exception...etc


Regarding the help file, there was a program called ndoc to create
compiled html document. But I don't know if there is a way to integrate
these information with the VS help file.

za***@construction-imaging.com wrote:
Show quoteHide quote
> Ahmed wrote:
> > Hi,
> >
> > In VS.NET 2005, after you declare:
> > Sub SUB1 (i as integer, s as string)
> >  end sub
> >
> > type ''' a line before the signiture
> >
> > and you will get the following:
> >
> >    ''' <summary>
> >     '''
> >     ''' </summary>
> >     ''' <param name="i"></param>
> >     ''' <param name="s"></param>
> >     ''' <remarks></remarks>
> > Sub SUB1 (i as integer, s as string)
> >  end sub
> >
> >
> > You can type the description for i and s between the >< (ie <param
> > name="i">i is an integer, does so and so</param>
> >
> > If you are using VS 2003 I believe you need to download VB commenter.
>
> So this is how you provide Intellisense with info about your function,
> eh? Just what is this technique referred to so I can look it up in the
> help?
Author
15 Jun 2006 9:25 PM
Herfried K. Wagner [MVP]
"Quinn" <q***@yahoo.com> schrieb:
> Sub SUB1 (i as integer, s as string)
> end sub
>
>
> how do I write some descriptions for i and s? that way when I call Sub1
> there will be a pop toothtip to describe what i and s is.

..NET 2.0:  Simply enter three consecutive single quotes in front of the
method declaration.

..NET 1.*:

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

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>