"Joe Fallon" <jf******@nospamtwcny.rr.com> schrieb
If I have an Enumeration can I give a text description for each
value?
e.g. something like
Public Enum Colors
Black "Really cool Black"
Blue "Ice Cold Labatts"
End Enum
If so, how do I get the text description for each value?
Code snippet would be great.
No, not possible. You could create a class containing a short and long
description, like:
public class mycolor
public readonly Name as string
public readonly Description as string
public sub new(name as string,description as string)
me.name = name
me.description = description
end sub
end class
Optionally/in addition:
public class mycolor
public readonly Name as string
public readonly Description as string
private sub new(name as string,description as string)
me.name = name
me.description = description
end sub
public shared readonly Blue as new mycolor _
("Blue", "Ice Cold Labatts")
end class
- or an arraylist with key=name and value=description, or...
--
Armin
How to quote and why:
http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html