Assume I have some enum like the following:
enum Towns { Rome, Napoli, Modena }
I want to associate a string for each enum member. Ideally, the string should be a description. I want to make sure that each town has a description:
Rome - Beautiful
Napoli - Good pizza
Modena - Ferrari store
I would also like to have it give me a compile time error if some town doesn’t have a description.
1 Answer