Parameter description

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Quinn

    #1

    Parameter description

    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.


  • Ahmed

    #2
    Re: Parameter description

    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[color=blue]
    >[/color]
    Quinn wrote:[color=blue]
    > 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.[/color]

    Comment

    • zacks@construction-imaging.com

      #3
      Re: Parameter description


      Ahmed wrote:[color=blue]
      > 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.[/color]

      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?

      Comment

      • Ahmed

        #4
        Re: Parameter description

        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: WindowsApplicat ion6.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.

        zacks@construct ion-imaging.com wrote:[color=blue]
        > Ahmed wrote:[color=green]
        > > 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.[/color]
        >
        > 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?[/color]

        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: Parameter description

          "Quinn" <qjia@yahoo.com > schrieb:[color=blue]
          > 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.[/color]

          ..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=tooltipsxml documentation&l ang=en>

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

          Comment

          Working...