How to display comments for each enum entry?

  • Thread starter Thread starter NewAlias
  • Start date Start date
N

NewAlias

How to display comments for each enum entry?

'Enum example with commnents commented

Private Enum MyEnum
YourName =1 ' Set this to get your real name
YourAge=2 ' Set this to get your real age
YourNationality=3 ' Set this to retrieve your real nationality
End Enum

'Program extract
....
GetInfoString(YourName

' I want a tooltip to show the text "Set this to get your real name" to
show when I select one of MyEnum entries
' please note that I am speaking about the IDE, not about the running
program


Thanks
 
* NewAlias said:
How to display comments for each enum entry?

'Enum example with commnents commented

Private Enum MyEnum
YourName =1 ' Set this to get your real name
YourAge=2 ' Set this to get your real age
YourNationality=3 ' Set this to retrieve your real nationality
End Enum

'Program extract
...
GetInfoString(YourName

' I want a tooltip to show the text "Set this to get your real name"
to show when I select one of MyEnum entries

' please note that I am speaking about the IDE, not about the running
program

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=112b5449-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/vclrfTagsForDocumentationComments.asp>

\\\

''' <summary>
''' Colors.
''' </summary>
Public Enum Colors

''' <summary>
''' Yellow.
''' </summary>
Yellow

''' <summary>
''' Blue.
''' </summary>
Blue
End Enum
///
 
I thank you very much for taking your time to repply
Can you tell me if there is any built-in attribute that allows to
display the comments?

I am not sure if my question was clear, it is not easy to explain anyway.

I will try another aproach:

I am looking for a built-in feature, kind of attribute???? to display
user enum tooltips similar to what you get when selecting a color to
complete the following line:

dim x as Brush=brushes.

as you type the '.' a list appears
when you use the cursors to browse the list a tooltip appears explaining
the meaning of each highlighted item

for instance, if you have AliceBlue highlighted the tooltip will display:

"Public Shared ReadOnly AliceBlue() As System.Drawing.Brush
Gets a system-defined System.Drawing.Brush object."

Completing the line:

dim x as Brush=Brushes.AliceBlue

When you move the mouse over the word AliceBlue, the tooltip displays:
Public Shared ReadOnly AliceBlue() As System.Drawing.Brush

I am not sure if my explanation is clear.
 
* NewAlias said:
I thank you very much for taking your time to repply
Can you tell me if there is any built-in attribute that allows to
display the comments?

AFAIK, no.
I am not sure if my question was clear, it is not easy to explain anyway.

I will try another aproach:

I am looking for a built-in feature, kind of attribute???? to display
user enum tooltips similar to what you get when selecting a color to
complete the following line:

Have a look at the links I posted previously. You will have to create
an XML file out of XML comments (or by hand) and name this file
"Foo.dll.xml", assuming your DLL's name is "Foo.dll". VS.NET will use
this file to load the tooltips.
 
OK :(

Thanks for your help
AFAIK, no.




Have a look at the links I posted previously. You will have to create
an XML file out of XML comments (or by hand) and name this file
"Foo.dll.xml", assuming your DLL's name is "Foo.dll". VS.NET will use
this file to load the tooltips.
 
Back
Top