foreach (var item in aList.OrderBy(o=>o.Codigo)) { ... ... Listado.AppendLine(itemCodigo+ " - " + item.ProductName); ... ... }