Enumerable.Join/GroupJoin ignores null keys; inconsistency with ToLookup and GroupBy. - by Jon Skeet

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 639943 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 1/28/2011 11:44:05 AM
Access Restriction Public


ToLookup and GroupBy both treat two null keys as equal (assuming their equality comparers do, of course). Join and GroupJoin discard elements which map to null keys instead.

I understand it would be too late to change the behaviour now, but it should at least be documented - I can't see anything which indicates that null keys are ignored.
Sign in to post a comment.
Posted by Søren Nguyen Boisen on 8/22/2016 at 10:01 AM
Oh great, closing the issue after completely misreading the description. Now we have to live with broken documentation forever... not impressed MS.
Posted by Dennis Wanke on 11/12/2012 at 2:25 AM
I just can't understand how such a huge inconsistency can be there for years and be ignored such easily. Really frustrating.
Posted by Jon Skeet on 3/25/2011 at 8:57 AM
I explicitly mentioned *Enumerable.Join/GroupJoin* - this has never been about LINQ to SQL.

Nor was I suggesting a *design* change as the comment suggests. I was saying that this inconsistent behaviour should be *documented* to avoid surprising users.
Posted by Microsoft on 3/25/2011 at 8:51 AM
Thank you for the feedback on LINQ to SQL. We have reviewed and verified the issue, but at this time are not taking any new design changes to LINQ to SQL for the next release of the .NET Framework.

LINQ to SQL Team
Posted by Microsoft on 1/28/2011 at 12:13 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)