// 遍历枚举 Type AA = typeof(DbType); foreach (string s in Enum.GetNames(AA)) { Console.WriteLine("{0,-11}= {1}", s, Enum.Format(AA, Enum.Parse(AA, s), "d")); }