获取Enum值的属性
using System.ComponentModel; // for DescriptionAttributeenum FunkyAttributesEnum{ [Description("Name With Spaces1")] NameWithoutSpaces1, [Description("Name With Spaces2")] NameWithoutSpaces2}
Array values = System.Enum.GetValues(typeof(FunkyAttributesEnum));foreach (int value in values) Tuple.Value = Enum.GetName(typeof(FunkyAttributesEnum), value);
相关分类