< C Sharp Programming < Keywords
The orderby contextual keyword is used to define the sort order of query results. Specifying orderby key1 ascending sorts from the smallest first to the largest at the end, while orderby key2 descending sorts from the largest first to the smallest at the end. The default sort order is ascending and if neither direction is specified, results will be sorted in ascending order. Multiple keys may be used to sort, with the first one specified being the primary sort and later entries providing secondary sorts when the first key matches, e.g., orderby lastName ascending, firstname ascending.
| C# Keywords | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Special C# Identifiers (Contextual Keywords) | |||||||||||||||
| |||||||||||||||
| Contextual Keywords (Used in Queries) | |||||||||||||||
|
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.