C# in Depth

Cover of C# in Depth
Order now (3rd edition)

Explicitly specifying an ascending order

Chapter 11: Query expressions and LINQ to Objects: 11.3.3

Created: 3/16/2008
Last updated: 3/16/2008

One feature I missed when writing about orderings is the ability to explicitly use the word ascending for a particular ordering. For example,

from person in people
order by person.Name
select person

is exactly equivalent to

from person in people
order by person.Name ascending
select person

The reason I missed this? I've never seen it used, that I recall. (Yes, I should still have spotted it when going through the spec, of course...)