Can I set static properties for an enum? for example:
enum animal{
cat, dog, elephant
}
if something is of type animal.elephant it can fetch a color value always returning grey?
Enum Properties
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Roei BarRank #1,271 · 1.4K reputationPosted Sep 18, 2009, 12:57 PM EDT
here is a sample
enum Animal { cat, dog } private Animal selectedAnimal = Animal.cat; public Color AnimalColor { get{switch (selectedAnimal ) { case Animal.Cat: return Color.Gray default: return Color.None; } } }patrickRank #4,458 · 342 reputationPosted Sep 18, 2009, 1:08 PM EDT