Linq-filtering-operators
提供:Dev Guides
LINQでの演算子のフィルタリング
フィルタリングは、特定の条件を満たす選択された要素のみを持つように結果セットを制限する操作です。
Operator | Description | C# Query Expression Syntax | VB Query Expression Syntax |
---|---|---|---|
Where | Filter values based on a predicate function | where | Where |
OfType | Filter values based on their ability to be as a specified type | Not Applicable | Not Applicable |
Whereの例-クエリ式
C#
VB
C#またはVBの上記のコードがコンパイルされて実行されると、次の結果が生成されます-