OrderByDescending
In this chapter you will learn:
Get to know OrderByDescending
using System;/*from j ava2s . c o m*/
using System.Linq;
public class MainClass {
public static void Main() {
string[] presidents = {"ant", "arding", "arrison", "eyes", "over", "Jackson"};
IEnumerable<string> items = presidents.OrderByDescending(s => s);
foreach (string item in items)
Console.WriteLine(item);
}
}
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Linq Operators