Is it possible to add a description to methods of a class?

  • Thread starter Thread starter Big Dave
  • Start date Start date
B

Big Dave

I'd like to have a description included in the tool tip
(intellisense?) when I call a method from a class I wrote. Just to
make sure I'm describing this correctly, I'm talking about the yellow
box that comes up with I call the method in code that shows what
parameters that method required. Is this possible? If so, how would
I do that?

I know I can add <description("string here")> on a method of a custom
control, but how do I do it if it's not a control, just a class? I
can't seem to do it the same way.

Thanks for your help!
 
If you're using C# you can add some XML Comments like so

/// <summary>
/// This is a description of my method or property
/// </summary>

right above the definition of the method or property. This will show the
text right below the parameter information. Here is an example of a
property that sets a variable called _Text.

/// <summary>
/// This is a description of my method or property
/// </summary>
public string Text
{
set{_Text = value;}
}

Hope this helps,
Mark Fitzpatrick
Microsoft MVP- FrontPage
 
Unfortunately I'm using vb.net. I tried adding '<summary>Description
text</summary> right about my method, but that didn't work. Does
anybody know if there's a way to do this with vb.net?
 
VBCommentor will provide the ability to add coments to methods just like C#.

However, you can only see the comments if the consumer of the component is
in C#. :/

Basically, VB.Net doesn't see the comments, but if you take that same
component and use it in C#, you will see the information.
 
Back
Top