Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Latest commit

 

History

History
21 lines (12 loc) · 812 Bytes

orderings-2.md

File metadata and controls

21 lines (12 loc) · 812 Bytes

LINQ - Ordering Operators

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.

orderby descending

This sample uses orderby and descending to sort a list of doubles from highest to lowest.

Descending ordering user defined types

This sample uses orderby to sort a list of products by units in stock from highest to lowest.

Next: Orderby then by » Previous: Ordering «

Home