LINQ C# Book

public void Linq28()
{
string[] words = { "cherry", "apple", "blueberry" };

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);
}
}
Result

The sorted list of words:
apple
blueberry
cherry