Attribute for intellisense help

  • Thread starter Thread starter Bob Altman
  • Start date Start date
B

Bob Altman

Hi,

What attribute(s) do I use to cause intellisense to provide descriptions of
my classes, methods, and arguments? I've been putting DescriptionAttribute
on all my methods and many of their arguments, but I just noticed that
intellisense apparently ignores this attribute.

TIA,

- Bob
 
Hi Bob,

Do you mean the xml comments?
If we declare the class as below, we will see the Summary description for
Class1 when we select the Class1 from the Intellisense listbox.

using System;
namespace TestIntellisense
{
/// <summary>
/// Summary description for Class1.
/// </summary>
///
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
///
string image1="";
/// <summary>
/// The image associated with the control
/// </summary>
///
public string MyImage
{
get
{
// Insert code here.
return image1;
}
set
{
// Insert code here.
}
}

[STAThread]
static void Main(string[] args)
{
Class1 cs = new Class1();
}
}
}


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
I assume that I can't do this from VB (yet). Is that correct?

This seems like an incredibly inconsistent way to do things. Why didn't
they use attributes to teach intellisense about type and argument
descriptions instead of trying to parse comments?

- Bob
 
I found a thread in the microsoft.public.dotnet.framework.vb NG that gives
references to a half dozen XML comment generators for VB. I downloaded and
installed VBCommentor from gotdotnet.com. It's got a few rough edges (in
particular, intellisense won't display comments for the current project,
only for projects that are referenced through a file reference), but it's
really slick and easy to use.

- Bob
 
[This is from the microsoft.public.dotnet.languages.vb newsgroup]

Here is Herfried K. Wagner [MVP] links for adding xml comments.

For VB.NET 2002/2003:

My XML Comments FAQ:

VB Commenter
<URL:http://www.gotdotnet.com/team/ide/>
-> section "VB Commenter"

XML Documentation
<URL:http://www.gotdotnet.com/team/vb/>
-> section "XML Documentation"

VBXC - VB.NET XML Commentor
<URL:http://vbxmldoc.tor-erik.net/>

NDOC (formerly DOC.NET)
<URL:http://ndoc.sourceforge.net/>

VB.DOC
<URL:http://vb-doc.sourceforge.net/>

<URL:http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=112b544
9-f702-46e2-87fa-86bdf39a17dd>

XML comments will be introduced to VB.NET in version 2005 ("Whidbey").

C# XML comments:

<URL:http://msdn.microsoft.com/library/en-us/csref/html/vclrfTagsForDocument
ationComments.asp>
 
Hi Bob,

Thank you for sharing the information in the newsgroup, I think many will
benefit from your experience.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top