C#遍历枚举(Enum)值

        foreach (object o in Enum.GetValues(typeof(EmpType)))
        {
            Console.WriteLine("{0}:{1}", o, Enum.Format(typeof(EmpType), o, "D"));
        }

原文地址:https://www.cnblogs.com/apollokk/p/6713868.html