fork download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var values = Enum.GetNames(typeof(VehicleData))
  9. .Cast<string>()
  10. .Select(x => x.ToString())
  11. .ToArray();
  12. foreach(var val in values)
  13. Console.WriteLine(val);
  14. }
  15. }
  16.  
  17. public enum VehicleData
  18. {
  19. Dodge = 15001,
  20. BMW = 15002,
  21. Toyota = 15003
  22. }
Success #stdin #stdout 0.03s 27816KB
stdin
Standard input is empty
stdout
Dodge
BMW
Toyota