May 2010
Intermediate to advanced
1272 pages
61h 18m
English
LINQ offers an operator named Where that allows filtering query results according to the specified condition. For example, continuing with the previous examples of a collection of products, the following code returns only nondiscontinued products:
![]()
The same result can be accomplished by invoking a same-named extension method that works as follows:
![]()
Where supports lots of operators on the line that are summarized in Table 24.1.
Table 24.1 Operators Supported by Where
The following code provides a more complex example of filtering ...
Read now
Unlock full access