LINQ Partition Operator
In LINQ, Partition Operators are used to partition the list/collections items into two parts and return one part of the list items. Here are the different types of partitioning operators available in LINQ.
- TAKE
- TAKEWHILE
- SKIP
- SKIPWHILE
By using these operators, we can partition the list/collection of items into two parts and return the one part of the list items.
The table shows more detailed information related to partition operators in LINQ.
Operator |
Description |
Query-Syntax |
TAKE |
This operator is used to return the specified number of elements in the sequence. |
Take |
TAKEWHILE |
This operator is used to return the elements in the sequence which satisfy the specific condition. |
Takewhile |
SKIP |
This operator is used to skip the specified number of elements in a sequence and return the remaining elements. |
Skip |
SKIPWHILE |
This operator is used to skip the elements in a sequence based on the condition, which is defined as true. |
Skipwhile |
|