在LINQ中,分区运算符用于将列表/集合项划分为两部分,并返回列表项的一部分。以下是LINQ中可用的不同类型的分区运算符。
- TAKE
- TAKEWHILE
- SKIP
- SKIPWHILE

通过使用这些运算符,我们可以将项的列表/集合划分为两部分,并返回列表项的一部分。
该表显示了与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 |