fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. enum Hoge
  6. {
  7. Hoge0 = 0,
  8. Hoge1,
  9. Hoge100 = 100,
  10. }
  11.  
  12. public static void Main()
  13. {
  14. var hogeArray = Enum.GetValues(typeof(Hoge));
  15. foreach (var h in hogeArray)
  16. {
  17. Console.WriteLine(string.Format("{0} = {1}", h, (int)h));
  18. }
  19. }
  20. }
Success #stdin #stdout 0.04s 33984KB
stdin
Standard input is empty
stdout
Hoge0 = 0
Hoge1 = 1
Hoge100 = 100