回到顶部
摘要: 在程序设计中,枚举是个很好的东西,一些简单的数据分类 可以定义一个枚举来实现,从而省略了建立分类表的繁琐,但是在添加一条数据的时候,确又需要绑定这个枚举的键值对来操作,那么试图将它们转换为list集合就更好了。public static IList ListTypeForEnum() { ArrayList list = new ArrayList(); foreach (int i in Enum.GetValues(typeof(NewsTypeEnum))) { ListItem... 阅读全文
posted @ 2013-02-22 10:16 telang 阅读(1760) 评论(0) 推荐(1)