fork download
  1. using static System.Convert;
  2. using static System.Console;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5.  
  6. public class Program {
  7. public static void Main() {
  8. List<Ata> lstAtas = new List<Ata>() {
  9. new Ata{ NroAta = "1"},
  10. new Ata{ NroAta = "10"},
  11. new Ata{ NroAta = "6"},
  12. new Ata{ NroAta = "4"},
  13. new Ata{ NroAta = "5"},
  14. new Ata{ NroAta = "2"},
  15. new Ata{ NroAta = "3"},
  16. };
  17. foreach (var ata in lstAtas.OrderBy(x => ToInt32(x.NroAta))) WriteLine(ata.NroAta);
  18. }
  19. }
  20. public class Ata {
  21. public string NroAta;
  22. }
  23.  
  24. //https://pt.stackoverflow.com/q/152015/101
Success #stdin #stdout 0.02s 17608KB
stdin
Standard input is empty
stdout
1
2
3
4
5
6
10