proper way to describe an enum

  • Thread starter Thread starter Smokey Grindle
  • Start date Start date
S

Smokey Grindle

What is the proper way in VS2005 to describe / document values of an enum? I
want it so when I have the list of values the person working with it can see
what they are in the IDE like other ones let you... like if you set the
formborderstyle the intellisense that pops up has a description next to each
enum value available in the tooltip that pops up... I was useing the
attribute description from the ComponentModel namespace, but I dont seem to
get descriptions anymore in VS2005 doing this...
 
I've always used the code style comments (in C#) for .NET 1.1. Now that
VB2005 (.NET 2.0) supports this, you should be able to do the same thing.
The contents in the <summary> node should show up in intellisense.

''' <summary>
''' An enumerated type to represent basic colors
''' </summary>
Public Enum Colors As Integer

''' <summary>
''' The color red.
''' </summary>
Red = 1

''' <summary>
''' The color black
''' </summary>
Black = 2

''' <summary>
''' The color green
''' </summary>
Green = 3

End Enum
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

about enum 3
Enum TypeConverter 3
Enum Properties Revisited 3
Global Enum question 1
Check an enum for an attribute 2
Inherit a class only with Enum Values 3
Enum Extentions 7
Enums 5

Back
Top