PART I
C h a p t e r 1 9 :
L I N Q
553
PART IPART I
You can use
orderby
to sort on one or more criteria. We will begin with the simplest
case: sorting on a single item. The general form of
orderby
that sorts based on a single
criterion is shown here:
orderby
sort-on how
The item on which to sort is specified by
sort-on.
This can be as inclusive as the entire element
stored in the data source or as restricted as a portion of a single field within the element.
The value of
how
determines if the sort is ascending or descending, and it must be either
ascending
or
descending
. The default direction is ascending, so you won’t normally specify
ascending
.
Here is an example that uses
Do'stlaringiz bilan baham: |