Missing Min() and Max() with selector

34 views
Skip to first unread message

Qwertie

unread,
Apr 9, 2011, 4:39:59 PM4/9/11
to LINQBridge
LinqBridge is missing non-nullable versions of Min() and Max() that
accept a selector, such as

public static int Min<TSource>(this IEnumerable<TSource>
source, Func<TSource, int> selector)
{
return source.Select(selector).Min();
}

...only nullable versions exist.

I discovered this omission as I was switching from the Mono
implementation of LINQ over to LINQBridge, and it broke Poor Man's
Linq (http://www.codeproject.com/KB/linq/linq2005.aspx), which
forwards LINQ calls to Enumerable.
Reply all
Reply to author
Forward
0 new messages