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

Latest commit

 

History

History
28 lines (16 loc) · 956 Bytes

orderings.md

File metadata and controls

28 lines (16 loc) · 956 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 sorts elements

This sample uses orderby to sort a list of words alphabetically.

Orderby using a property

This sample uses orderby to sort a list of words by length.

Ordering user defined types

This sample uses orderby to sort a list of products by name.

Next: Orderby descending » Previous: Partitions with conditions «

Home