Working with Data
Sorting
OrderBy
Sorts values in ascending order.
orderby
OrderByDescending
Sorts values in descending order.
orderby … descending
ThenBy
Performs a secondary sort in ascending order.
orderby …, …
ThenByDescending
Performs a secondary sort in descending order.
orderby …, … descending
Reverse
Reverses the order of the elements in a collection.
NA
Filtering
OfType
Selects values, depending on their ability to be cast to a specified type.
NA
Where
Selects values that are based on a predicate function.
where
Partitioning
Skip
Skips elements up to a specified position in a sequence.
SkipWhile
Skips elements based on a predicate function until an element does not satisfy the condition.
Take
Takes elements up to a specified position in a sequence.
TakeWhile
Takes elements based on a predicate function until an element does not satisfy the condition.
Chunk
Splits the elements of a sequence into chunks of a specified maximum size.
Grouping
GroupBy
Groups elements that share a common attribute. Each group is represented by an IGrouping<TKey,TElement> object.
group … by
-or-
group … by … into …
ToLookup
Inserts elements into a Lookup<TKey,TElement> (a one-to-many dictionary) based on a key selector function.
NA
Last updated
Was this helpful?