2018年7月11日

C#中对于Enum类型的遍历

摘要: 假设有enum类型定义为MyEnumType 则可以这样遍历: //遍历 枚举类型中的所有成员 foreach (MyEnumType type in Enum.GetValues(typeof(MyEnumType))) foreach (MyEnumType type in Enum.GetVa 阅读全文

posted @ 2018-07-11 11:42 itjeff 阅读(691) 评论(0) 推荐(0) 编辑

导航