Linq-partition-operators
提供:Dev Guides
LINQのパーティションオペレーター
入力シーケンスを2つのセクションに分割します。シーケンスの要素を並べ替えてから1つを返すことはありません。
Operator | Description | C# Query Expression Syntax | VB Query Expression Syntax |
---|---|---|---|
Skip | Skips some specified number of elements within a sequence and returns the remaining ones | Not Applicable | Skip |
SkipWhile | Same as that of Skip with the only exception that number of elements to skip are specified by a Boolean condition | Not Applicable | Skip While |
Take | Take a specified number of elements from a sequence and skip the remaining ones | Not Applicable | Take |
TakeWhile | Same as that of Take except the fact that number of elements to take are specified by a Boolean condition | Not Applicable | Take While |
スキップの例-クエリ式
VB
VBの上記のコードがコンパイルされて実行されると、次の結果が生成されます-
Skip Whileの例-クエリ式
VB
VBの上記のコードがコンパイルされて実行されると、次の結果が生成されます-
テイクの例-クエリ式
VB
VBの上記のコードがコンパイルされて実行されると、次の結果が生成されます-
Take Whileの例-クエリ式
VB
VBの上記のコードがコンパイルされて実行されると、次の結果が生成されます-