Skip to content

Queryable.{Max,Min}By overloads accept an IComparer<TSource> instead of IComparer<TKey> #113878

@jcracknell

Description

@jcracknell

public static TSource? MaxBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TSource>? comparer)

It's entirely possible nobody has ever used these overloads as I am unclear what an IQueryable implementation would do with the comparer, however the analogous Enumerable methods appear to correctly accept an IComparer<TKey>:

public static TSource? MaxBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Linqbugin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions