using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
publicclass MainClass {
publicstaticvoid Main() {
string[] words = { "C", "a", "b" };
var sortedWords =
from w in words
orderby w
select w;
Console.WriteLine("The sorted list of words:");
foreach (var w in sortedWords) {
Console.WriteLine(w);
}
}
}
22.10.OrderBy
22.10.1.
OrderBy: prints an alphabetically sorted version of a string array