Is there such a thing as a thing that returns an IEnumerable<object> or IEnumerable<T> for each matching hash code in .Net 4? That is, I want something that just uses the GetHashCode() and ignores the equality operator.
I thought I was barking up the wrong tree for a while after all these comments. But I found these guys. Granted it’s a .net 2 implementation… but at least a few other people thought a 1:n mapping using hash keys was a good idea. See the description for HashMap under http://recursionsw.com/Products/csharp.html
You could use the
ToLookup<>. But I’m not sure it’s what you really want. An exampleNow each group in groupedByHash will contain all the elements that share the same hashcode. You can consider them to be “equal” by your standard.