摘要: public enum Suit{ Spades, Hearts, Clubs, Diamonds}//遍历valueforeach (Suit suit in (Suit[]) Enum.GetValues(typeof(Suit))){}//遍历nameforeach(string name in Enum.GetNames(typeof(Suits))) { System.Console.WriteLine(name); }public static class EnumExtensions{ ///... 阅读全文
posted @ 2013-12-10 16:05 walleyekneel 阅读(439) 评论(0) 推荐(0) 编辑