Results 1 to 17 of 17

Thread: tooltip description for functions?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    tooltip description for functions?

    umm I dont do C# often (or dont know much C# to be more correct )... I'm wondering what these comments mean:
    /// <summary>
    /// Summary description for Effects.
    /// </summary>

    are they used only for making documentations and such? how would I show tooltip descriptions for my function and its variables?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Exactly like that Adding <param name="blah">[Description</param> elements will add the description of your parameters in the tooltip

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hmm... I'm writnig this in C# and then using it in vb. but apparently none of the comments that I write this way show in the tooltips
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    They should. First, create your method. Then, right above the method, type ///

    This will automatically create the xml for you to fill in.

    Then, it should show up just fine in the IDE intellisense.

  5. #5

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    /// <summary>
    /// something here
    /// </summary>
    public static void foo()
    {}

    I don't know what I'm doing wrong. I have a C# project ,and in the same solution another project in VB. I'm referencing the C# project correctly too. shows any changes that I make to the C# project, but wont show any of the xml text. It only shows the function signature in the tooltip. If I type the function name in the C# project however, it shows the tooltip correctly with all the xml info that I typed. But it isnt working in VB
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  6. #6
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Try compiling the C# project with the comments in it.

    Then, go into the vb project and try again. I wonder if the IDE will only pick them up from a compiled DLL when in VB mode?...

  7. #7

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hmm not working I even tried adding the dll to another project
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I can't get it to work either right now. I didn't try all the variations though, and I know there is a way to get the to show in VB, I thought I have done it before. Maybe I was mistaken.

  9. #9

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by hellswraith
    I can't get it to work either right now. I didn't try all the variations though, and I know there is a way to get the to show in VB, I thought I have done it before. Maybe I was mistaken.
    err I dotn understand why MS wont make C# and VB like each other

    anyways, vs.net 2004 will have this feature for visual basic as well, right?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  10. #10
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by MrPolite
    anyways, vs.net 2004 will have this feature for visual basic as well, right?
    Yes .

  11. #11
    New Member
    Join Date
    May 2013
    Posts
    3

    Re: tooltip description for functions?

    For anyone that stumbles across this as I did, comments in VB are with ' not /, so the auto-generated XML function comment block is done with ''' instead of ///

  12. #12
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: tooltip description for functions?

    Same in VB.net:
    vbnet Code:
    1. ''' <summary>
    2. '''
    3. ''' </summary>
    4. ''' <remarks></remarks>

    edit; I didn't see how old this thread was...

    Quote Originally Posted by Vitzkrieg View Post
    For anyone that stumbles across this as I did, comments in VB are with ' not /, so the auto-generated XML function comment block is done with ''' instead of ///
    Yes, but you realize this is not the VB.net section this is the C# section correct? Therefore the difference here, or even the reference to VB.net in these parts is entirely irrelevant. You shouldn't have brought this thread back up though, this is years old.

    ~Ace
    <<<------------
    Improving Managed Code Performance | .NET Application Performance
    < Please if this helped you out. Any kind of thanks is gladly appreciated >


    .NET Programming (2012 - 2018)
    ®Crestron - DMC-T Certified Programmer | Software Developer
    <<<------------

  13. #13
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: tooltip description for functions?

    Now that this thread has been resurrected, I'll mention that the original issue was because of n option in the project properties. The tool tips don't come from the DLL but rather the XML file that accompanies it. VB projects generate that XML file by default but C# projects don't, so you have to tell them to. In VS 2012, you have to check the 'XML documentation file' box under the Output section of the Build page of the project properties. It will be similar but may not be exactly the same in other versions and editions.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  14. #14
    New Member
    Join Date
    May 2013
    Posts
    3

    Re: tooltip description for functions?

    I did realize how old this thread was, that's why I graded my response the way I did. If threads this old shouldn't be resurrected, then comments should be turned off on them. And it's not like I'm causing a zombie apocalypse by resurrecting this.

    I found this thread by searching for VB.net comments and it sounded like the use was with VB when I first read it I guess bringing it up wasn't all bad because now I know where to generate XML comment in VS2012.

  15. #15
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: tooltip description for functions?

    Quote Originally Posted by Vitzkrieg View Post
    I did realize how old this thread was, that's why I graded my response the way I did. If threads this old shouldn't be resurrected, then comments should be turned off on them. And it's not like I'm causing a zombie apocalypse by resurrecting this.

    I found this thread by searching for VB.net comments and it sounded like the use was with VB when I first read it I guess bringing it up wasn't all bad because now I know where to generate XML comment in VS2012.
    My view on bumping threads is simple: By bumping a thread you essentially move a potentially more "important" thread (for instance, a thread where someone is asking for help and their issue still hasn't been solved yet), below this thread in the results queue. (Note: newest threads or threads with most recent posts by default are placed at the top of the list.) Therefore, I see nothing wrong with bumping threads, as long as there is a good reason for it. Your post was about VB.net however, and this is the C# section, so consequently I viewed it as an unnecessary post from my perspective. Hopefully you can understand why I pointed that out now...

    jmcilhinney added onto the information though, so there was somewhat of a positive result of you bumping this thread afterwards. Usually that does not happen though, and what ends up happening is other people overlook the fact that it's years old, thinking that this is a new thread, and they attempt to post more "solutions" to help the thread poster, even if answers are already given, OR the original poster is no longer active on the forum.
    <<<------------
    Improving Managed Code Performance | .NET Application Performance
    < Please if this helped you out. Any kind of thanks is gladly appreciated >


    .NET Programming (2012 - 2018)
    ®Crestron - DMC-T Certified Programmer | Software Developer
    <<<------------

  16. #16
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: tooltip description for functions?

    Quote Originally Posted by AceInfinity View Post
    My view on bumping threads is simple: By bumping a thread you essentially move a potentially more "important" thread (for instance, a thread where someone is asking for help and their issue still hasn't been solved yet), below this thread in the results queue. (Note: newest threads or threads with most recent posts by default are placed at the top of the list.) Therefore, I see nothing wrong with bumping threads, as long as there is a good reason for it. Your post was about VB.net however, and this is the C# section, so consequently I viewed it as an unnecessary post from my perspective. Hopefully you can understand why I pointed that out now...

    jmcilhinney added onto the information though, so there was somewhat of a positive result of you bumping this thread afterwards. Usually that does not happen though, and what ends up happening is other people overlook the fact that it's years old, thinking that this is a new thread, and they attempt to post more "solutions" to help the thread poster, even if answers are already given, OR the original poster is no longer active on the forum.
    Quite true. For such old threads, it's a much better idea to start a new thread and provide a link to the older one if appropriate.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  17. #17
    New Member
    Join Date
    May 2013
    Posts
    3

    Re: tooltip description for functions?

    I totally understand where everyone is coming from. I guess at the time I didn't even look what category this was under because I searched for VB comments and ended up at VBForums - wasn't expecting there to be a C# section. My apologies.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width