fork download
  1. using System;
  2. using System.Linq;
  3. using static System.Console;
  4.  
  5. public class Program {
  6. public static void Main() {
  7. var lista = Enum.GetValues(typeof(TiposHospedagem)).Cast<int>().ToList();
  8. foreach (var item in lista) WriteLine(item);
  9. }
  10. }
  11.  
  12. public enum TiposHospedagem {
  13. Casa = 1,
  14. Hotel = 2,
  15. Pousada = 3,
  16. CasaCampo = 4
  17. }
  18.  
  19. //https://pt.stackoverflow.com/q/150208/101
Success #stdin #stdout 0.02s 17220KB
stdin
Standard input is empty
stdout
1
2
3
4