Working with Data
Sorting
Method Name | Description | C# Query Expression Syntax |
---|---|---|
OrderBy | Sorts values in ascending order. |
|
OrderByDescending | Sorts values in descending order. |
|
ThenBy | Performs a secondary sort in ascending order. |
|
ThenByDescending | Performs a secondary sort in descending order. |
|
Reverse | Reverses the order of the elements in a collection. | NA |
Filtering
Method Name | Description | C# Query Expression Syntax |
---|---|---|
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. |
|
Partitioning
Method names | Description |
---|---|
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
Method Name | Description | C# Query Expression Syntax |
---|---|---|
GroupBy | Groups elements that share a common attribute. Each group is represented by an IGrouping<TKey,TElement> object. |
|
ToLookup | Inserts elements into a Lookup<TKey,TElement> (a one-to-many dictionary) based on a key selector function. | NA |
Last updated