IEnumerable<T>.Where Method
Overloads
| Where(Predicate<T>) |
Filters the sequence based on the specified predicate. |
| Where(Func<T,Integer,Boolean>) |
Filters the sequence based on the specified predicate. Each element's index is used in the logic of the predicate function. |
Filters the sequence based on the specified predicate.
function Where(const predicate: Predicate<T>): IEnumerable<T>
Parameters
- predicate
- Predicate<T>
A function to test each element for a condition.
Returns
A sequence that contains elements from the input sequence that satisfy the condition.
Exceptions
predicate is nil .
Filters the sequence based on the specified predicate. Each element's index is used in the logic of the predicate function.
function Where(const predicate: Func<T, Integer, Boolean>): IEnumerable<T>
Parameters
- predicate
- Func<T, Integer, Boolean>
A function to test each source element for a condition; the second parameter of the function represents the index of the source element.
Returns
A sequence that contains elements from the input sequence that satisfy the condition.
Exceptions
predicate is nil .