Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Latest commit

 

History

History
35 lines (20 loc) · 1.29 KB

quantifiers.md

File metadata and controls

35 lines (20 loc) · 1.29 KB

LINQ - Quantifiers

The methods Any, and All determine of all elements or any elements match a condition.

Check for any matching elements

This sample uses Any to determine if any of the words in the array contain the substring 'ei'.

Group by any elements matching a condition

This sample uses Any to return a grouped a list of products only for categories that have at least one product that is out of stock.

Check that all elements match a condition

This sample uses All to determine whether an array contains only odd numbers.

Group by all elements matching a condition

This sample uses All to return a grouped a list of products only for categories that have all of their products in stock.

Next: Aggregate operations » Previous: Generate sequence elements »

Home