About This eBook by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Restriction

One of the most common query operations is obviously to filter out elements based on certain conditions. Those conditions can either be on a per-element basis (such as with the Where operator) or have a more global nature (as with Skip or Take). In essence, we’re talking here about horizontal partitioning where a given number of objects in the input sequence are filtered down to a subset. Those restriction operators don’t change the shape of the data and preserve the type of the input sequence.

Where

The first restriction operator is one we’re already familiar with. The Where operator evaluates a condition for each element in the input sequence, only retaining objects for which the condition evaluated to true. Two overloads exist: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required