标签:
enum MyEnum { Value1, Value2, } class Program { static void Main(string[] args) { var e = new MyEnum(); string[] values = System.Enum.GetNames(e.GetType()); //... } }
C#获得枚举类型的长度
原文地址:http://www.cnblogs.com/hont/p/5677545.html