Linq-quantifier-operations
提供:Dev Guides
LINQの数量詞操作
これらの演算子はブール値、つまり シーケンス内の一部またはすべての要素が特定の条件を満たす場合に真または偽。
Operator | Description | C# Query Expression Syntax | VB Query Expression Syntax |
---|---|---|---|
All | Returns a value ‘True’ if all elements of a sequence satisfy a predicate condition | Not Applicable | Aggregate … In … Into All(…) |
Any | Determines by searching a sequence that whether any element of the same satisfy a specified condition | Not Applicable | Aggregate … In … Into Any() |
Contains | Returns a ‘True’ value if finds that a specific element is there in a sequence if the sequence doe not contains that specific element , ‘false’ value is returned | Not Applicable | Not Applicable |
すべての例-All(Of TSource)拡張メソッド
VB
VBの上記のコードがコンパイルされて広告が実行されると、次の結果が生成されます-
Any-拡張メソッドの例
VB
VBの上記のコードがコンパイルされて広告が実行されると、次の結果が生成されます-