Chuhukon, Collection, Array and Csharp

Welcome to Koodr. Don't miss a snippet from Chuhukon and learn more about: Collection, Array and Csharp . At Koodr you show what code you have got. Use your OpenID to login and start sharing your own Collection snippets.



Jeroen Wijdeven

Sort a #Collection of integers #Array #Csharp #Fundamentals

List<int> foo = new List<int>(new int[] { 4, 5, 1, 2, 9, 8, 10, 11 });
foo.Sort((x, y) => x.CompareTo(y));

//show the result:
foreach (int i in foo)