Skip to content

.NET 6.0 Enumerable.MaxBy conflicts with Enumerable.MaxBy #1647

@clement911

Description

@clement911

.NET 6.0 introduces built-in methods for MaxBy/MinBy which have the same signature as the IX ones.
As a result, after upgrading to .NET 6.0, I get the following error:

The call is ambiguous between the following methods or properties: 'System.Linq.EnumerableEx.MaxBy<TSource, TKey>(System.Collections.Generic.IEnumerable, System.Func<TSource, TKey>)' and 'System.Linq.Enumerable.MaxBy<TSource, TKey>(System.Collections.Generic.IEnumerable, System.Func<TSource, TKey>)'

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions