Assume myHashSet = HashSet<SomeClass>
where SomeClass.hashcode() = someField.hashcode()
How can I return an element with the specified hashcode, i.e:
myHashSet.getElementWithHashCode((other as SomeClass).someField.hashcode())
other and the objects inside the HashSet are different objects with different property values except someField value. In other words, these two different type of objects have a common field that might have the same value.
It is weird that there is no such function in HashSet. No one needed that before? What is the quickest way around?