Is it possible to add custom properties to c# enum object?
问题 Using c# Is it possible using to associate properties for each enum items? I have used the Description Attribute to add English description to an enum item. To add English description to each item I have done the following public enum MyEnum { [Description("My First Item")] First, [Description("My Second Item")] Second, [Description("My Third Item")] Third } Then I added an extension method to my enum called GetDescription() which allows me to get the description like so public static string