First OrderBy Prototype
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
public static void Main() {
string[] presidents = {"ant", "arding", "arrison", "eyes", "over", "ackson"};
IEnumerable<string> items = presidents.OrderBy(s => s.Length);
foreach (string item in items)
Console.WriteLine(item);
}
}
Related examples in the same category