I have a CustomObject object which overrides GetHashCode(). I have a HashSet, and I am able to call add with two distinct object having the same hash code. Both get added and later on I end up with some database insertion troubles (primary key duplicates)... The purpose of using a hashSet was connected to these database insertions (avoiding key collisions).
Am I possibly missing out on some properties of HashSet ? Even when I try checking (.Contains) before adding (.Add), I end up adding hashCode duplicates...