fork(77) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var values = Enum.GetValues(typeof(VehicleData))
  9. .Cast<int>()
  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.04s 34008KB
stdin
Standard input is empty
stdout
15001
15002
15003