i have a class whose equality is based on 2 fields such that if either one is equal then the objects of this type are considered equal. how can i write a hashCode() function for
How about
public override int GetHashCode() { return id.GetHashCode() ^ name.GetHashCode(); }