OrderByDescending

suggest change
var persons = new[] 
{
    new {Id = 1, Name = "Foo"},
    new {Id = 2, Name = "Bar"},
    new {Id = 3, Name = "Fizz"},
    new {Id = 4, Name = "Buzz"}
};

var personsSortedByNameDescending = persons.OrderByDescending(p => p.Name);

Console.WriteLine(string.Join(",", personsSortedByNameDescending.Select(p => p.Id).ToArray()));

//1,3,4,2

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


LINQ:
* LINQ
* Any
* Except
* Zip
* Concat
* Count
* Min
* Cast
* All
* Sum
* Take
* OfType
* Max
* Skip
* Last
* Union
* ToList
* Single
* Join
* OrderByDescending
* Empty
* ThenBy
* Range
* Repeat

Table Of Contents