The orderby
clause of a LINQ query sorts the output sequence. You can control the properties used for sorting, and specify ascending or descending order.
This sample uses orderby
to sort a list of words alphabetically.
This sample uses orderby to sort a list of words by length.
This sample uses orderby to sort a list of products by name.
Next: Orderby descending » Previous: Partitions with conditions «