Method Where
Where<TSource>(IEnumerable<TSource>, Func<TSource, bool>, int)
Filters a sequence of values based on a predicate and limits the number of results.
public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, int limit)
Parameters
source
IEnumerable<TSource>The source values.
predicate
Func<TSource, bool>The predicate.
limit
intThe limit.
Returns
- IEnumerable<TSource>
The filtered results.
Type Parameters
TSource
The type of the elements of
source
.