using System.Collections.Generic;
public static void Main()
List<int> xx = new List<int>()
{2, 5, 1, 0, 10, 1022, 23};
var res = Program.SortedList(xx);
foreach (var item in res)
public static List<int> SortedList(List<int> a)
List<int> holdSortedList = a;
for (int i = 0; i < a.Count; i++)
for (int j = 0; j < a.Count; j++)
if (holdSortedList[i] < holdSortedList[j])
var temp = holdSortedList[i];
holdSortedList[i] = holdSortedList[j];
holdSortedList[j] = temp;