©2009 Microsoft Corporation. All rights reserved.
C# Language Reference
descending (C# Reference)

Updated: July 2008

The descending contextual keyword is used in the orderby clause [ http://msdn.microsoft.com/en-us/library/bb383982.aspx ] in query expressions to specify that the sort order is from largest to smallest.

The following example shows the use of descending in an orderby clause [ http://msdn.microsoft.com/en-us/library/bb383982.aspx ] .

C#
IEnumerable<string> sortDescendingQuery =
    from vegetable in vegetables
    orderby vegetable descending
    select vegetable;

Concepts

LINQ Query Expressions (C# Programming Guide) [ http://msdn.microsoft.com/en-us/library/bb397676.aspx ]

Reference

ascending (C# Reference) [ http://msdn.microsoft.com/en-us/library/cc713606.aspx ]

Other Resources

C# Reference [ http://msdn.microsoft.com/en-us/library/618ayhy6.aspx ]

Date

History

Reason

July 2008

Added topic.

Information enhancement.

Tags: 
 
Community Content