Description of Function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • patrickparent@gmail.com

    #1

    Description of Function

    I'm looking for a way to add comment directly in the tooltip that pops
    when you type a function and you have to insert parameters.

    Like the tooltips you have when you create a new ArrayList

    Dim a as new arraylist(capac ity)
    capacity : The number of argument ...

  • Herfried K. Wagner [MVP]

    #2
    Re: Description of Function

    <patrickparent@ gmail.comschrie b:
    I'm looking for a way to add comment directly in the tooltip that pops
    when you type a function and you have to insert parameters.
    >
    Like the tooltips you have when you create a new ArrayList
    >
    Dim a as new arraylist(capac ity)
    capacity : The number of argument ...
    VB 2005 supports XML comments out of the box. Simply type "'''" in front of
    the method declaration.

    Solutions for older versions of VB.NET:

    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

    • Zoe Hart

      #3
      Re: Description of Function

      If you do the autodocumenting tags (signalled by three comment characters
      ''') and fill in comments for each parameter, those comments show up in the
      tooltips. Here's how it looks for a method of mine:

      ''' <summary>
      ''' Writes a message to the Windows Event Log
      ''' </summary>
      ''' <param name="logName"> Name of the target Log within the Event
      Log</param>
      ''' <param name="sourceNam e">Name of the event Source</param>
      ''' <param name="machineNa me">Name of the target server where the Event Log
      resides</param>
      ''' <param name="message"> The message to be logged</param>
      ''' <param name="messageTy pe">The EventLogEntryTy pe (e.g. Error, Warning,
      Information, etc.)</param>
      ''' <remarks></remarks>

      Typing ''' causes VS2005 to generate the tags based on your method
      signature. You then fill in the text within the tags.

      When I make a call to that method in my code and hit the opening parentheses
      the tooltip says "logName: Name of the target Log within the Event Log".

      Zoe
      <patrickparent@ gmail.comwrote in message
      news:1155137340 .610488.49430@p 79g2000cwp.goog legroups.com...
      I'm looking for a way to add comment directly in the tooltip that pops
      when you type a function and you have to insert parameters.
      >
      Like the tooltips you have when you create a new ArrayList
      >
      Dim a as new arraylist(capac ity)
      capacity : The number of argument ...
      >

      Comment

      • The Grim Reaper

        #4
        Re: Description of Function

        Herfried,

        Can you expand on your comment that VB 2005 supports XML comments?!? I
        can't find it in the MSDN anywhere!
        Don't suppose you could give a quick example?

        _______________ _______________ _____________
        The Grim Reaper

        "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
        news:utYIKu8uGH A.3372@TK2MSFTN GP02.phx.gbl...
        <patrickparent@ gmail.comschrie b:
        >I'm looking for a way to add comment directly in the tooltip that pops
        >when you type a function and you have to insert parameters.
        >>
        >Like the tooltips you have when you create a new ArrayList
        >>
        >Dim a as new arraylist(capac ity)
        >capacity : The number of argument ...
        >
        VB 2005 supports XML comments out of the box. Simply type "'''" in front
        of the method declaration.
        >
        Solutions for older versions of VB.NET:
        >
        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

        • The Grim Reaper

          #5
          Re: Description of Function

          Sorry!! Worked it out myself!!

          For anyone else as forgetful as me - you need to have "Generate XML
          documentation file" checked under the Compile options of My Project.
          _______________ _______________ __________
          The Grim Reaper

          "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
          news:utYIKu8uGH A.3372@TK2MSFTN GP02.phx.gbl...
          <patrickparent@ gmail.comschrie b:
          >I'm looking for a way to add comment directly in the tooltip that pops
          >when you type a function and you have to insert parameters.
          >>
          >Like the tooltips you have when you create a new ArrayList
          >>
          >Dim a as new arraylist(capac ity)
          >capacity : The number of argument ...
          >
          VB 2005 supports XML comments out of the box. Simply type "'''" in front
          of the method declaration.
          >
          Solutions for older versions of VB.NET:
          >
          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...