Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((AddressComparer.GetHashCode(From) * 397) ^ AddressComparer.GetHashCode(To));
     }
 }
 public int GetHashCode(AddressBookRecord obj)
 {
     unchecked
     {
         var hashCode = 19;
         hashCode = (hashCode * 397) ^ (obj.Address != null ? AddressComparer.GetHashCode(obj.Address) : 0);
         hashCode = (hashCode * 397) ^ (obj.Business != null ? BusinessComparer.GetHashCode(obj.Business) : 0);
         hashCode = (hashCode * 397) ^ (obj.Contact != null ? ContactComparer.GetHashCode(obj.Contact) : 0);
         return(hashCode);
     }
 }