Method MinN
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
MinN<TSource, TResult>(IEnumerable, Func<TSource, TResult>, int)
Returns the min n results.
public static IEnumerable<TResult> MinN<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector, int n)
Parameters
source
IEnumerable
The source.
selector
Func<TSource, TResult>
The selector.
n
int
The number of results to return.
Returns
The min n results.
Type Parameters
TSource
The source type.
TResult
The result type.
MinN<TSource, TKey, TResult>(IEnumerable, Func<TSource, TResult>, TKey, Func<TKey, int>)
Returns the min n results.
public static IEnumerable<TResult> MinN<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector, TKey key, Func<TKey, int> n)
Parameters
source
IEnumerable
The source.
selector
Func<TSource, TResult>
The selector.
key
TKey
The key (needed to infer the key type and to determine the key serializer).
The number of results to return.
Returns
The min n results.
Type Parameters
TSource
The source type.
TKey
The key type.
TResult
The result type.