I have a Enum and want to add a description foreach value. I read something about attributes, which could solve my problem. I try to implement the solution from msdn but without succes. It works if iam using a class but not with enum values.
Is it possible that someone post how that works?
regards
Heres a link to the msdn solution. Thats what i try to do. Only difference is that i want to do with enum value.
http://msdn.microsoft.com/de-de/library/aa288454(v=vs.71).aspx
Example:
public enum Color
{
[Description("This is red")]
Red,
[Description("This is blue")]
Blue
}
how can i get acces to the description and how i have to implement the description class/method?