I have an ArrayList that contains,
[0] = \"1\"
[1] = \"10\"
[2] = \"2\"
[3] = \"15\"
[4] = \"17\"
[5] = \"5\"
[6] = \"6\"
[7] = \"27\"
[8] = \"8\"
[9] = \"9\"
>
If you can get the ArrayList items into a strongly typed container such as List
public void Test_SortArrayList()
{
ArrayList items = new ArrayList(new []{"1", "10", "2", "15", "17", "5", "6", "27", "8", "9"});
string[] strings = (string[])items.ToArray(typeof(string));
List result = strings
.Select(x => new
{
Original = x,
Value = Int32.Parse(x)
})
.OrderBy(x => x.Value)
.Select(x => x.Original)
.ToList();
result.ForEach(Console.WriteLine);
}