楼上,就是从头到尾列出
不太清楚楼主的想法,ENUM没这个功能(自以为的)
你不如换用数组或其它的吧

解决方案 »

  1.   

    tryforeach(string s in Enum.GetNames(typeof(yourEnum)))
    {
    MessageBox.Show(s);
    }
      

  2.   

    enum Days {Sat, Sun, Mon, Tue, Wed, Thu, Fri};foreach(string s in Enum.GetNames(typeof(Days)))
    Console.WriteLine(s);
      

  3.   

    using System;public class GetNamesTest {
        enum Colors { Red, Green, Blue, Yellow };
        enum Styles { Plaid, Striped, Tartan, Corduroy };    public static void Main() {        Console.WriteLine("The values of the Colors Enum are:");
            foreach(string s in Enum.GetNames(typeof(Colors)))
                Console.WriteLine(s);        Console.WriteLine();        Console.WriteLine("The values of the Styles Enum are:");
            foreach(string s in Enum.GetNames(typeof(Styles)))
                Console.WriteLine(s);
        }
    }
      

  4.   

    得到枚举值:foreach(int i in Enum.GetValues(typeof(Styles)) as int[])
                Console.WriteLine(i);