Skip to content
New issue

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

DistinctBy should allow a null comparer #3

Closed
GoogleCodeExporter opened this issue Mar 23, 2015 · 1 comment
Closed

DistinctBy should allow a null comparer #3

GoogleCodeExporter opened this issue Mar 23, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

int[] source = { 1, 2, 3, 2, 1 };
source.DistinctBy(x => x, null);

What is the expected output? What do you see instead?

The expected output is { 1, 2, 3 } assuming the default comparer 
implementation since a null comparer is supplied. This would be consistent 
with the Enumerable.Distinct operator from Microsoft's base LINQ-to-
Objects implementation. However, what one sees instead is a 
ArgumentNullException from DistinctBy.

Original issue reported on code.google.com by azizatif on 15 Feb 2009 at 6:58

@GoogleCodeExporter
Copy link
Author

Fixed in r5.

Original comment by azizatif on 15 Feb 2009 at 7:01

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant