fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. enum letters: int
  6. {
  7. a,b,c,d,e,f
  8. }
  9.  
  10.  
  11. static void Main(string[] args)
  12. {
  13. foreach (var s in Enum.GetValues(typeof(letters)))
  14. {
  15. Console.Write((int)s);
  16. }
  17. Console.WriteLine();
  18. foreach (var s in Enum.GetNames(typeof(letters)))
  19. {
  20. Console.Write(s);
  21. }
  22. Console.WriteLine();
  23.  
  24. Console.WriteLine(Enum.GetName(typeof(letters), 5));
  25.  
  26.  
  27. }
  28. }
Success #stdin #stdout 0.03s 33976KB
stdin
Standard input is empty
stdout
012345
abcdef
f