We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string?[] a = { null, null }; var m = a.MinBy(x => x); // throws no InvalidOperationException collection has no elements.
This happens since the methods looks for non default value while the correct is to have an indicator for not empty enumeration.
The text was updated successfully, but these errors were encountered:
https://github.com/microsoft/referencesource/blob/5697c29004a34d80acdaf5742d7e699022c64ecd/System.Core/System/Linq/Enumerable.cs#L1540
Sorry, something went wrong.
https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.minby?view=net-6.0 https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.maxby?view=net-6.0
No branches or pull requests
This happens since the methods looks for non default value while the correct is to have an indicator for not empty enumeration.
The text was updated successfully, but these errors were encountered: