-
Notifications
You must be signed in to change notification settings - Fork 26
Where
Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.
Where(predicate)
A function to test each source element for a condition; the second parameter of the function represents the index of the source element: Boolean predicate(TSource, index)
An Iterable that contains elements from the input sequence that satisfy the condition.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated.
The first argument of predicate represents the element to test. The second argument represents the zero-based index of the element within source.