public override int GetHashCode() { unchecked { var hashCode = (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SurName != null ? SurName.GetHashCode() : 0); return(hashCode); } }
//Basic Hashcode and Equals methods public override int GetHashCode() { int hash = 5; hash = 83 * hash + FirstName.GetHashCode(); hash = 83 * hash + SurName.GetHashCode(); hash = 83 * hash + EmailAdress.GetHashCode(); hash = 83 * hash + PhoneNumber.GetHashCode(); hash = 83 * hash + Birthday.GetHashCode(); hash = 83 * hash + SerialNumber; return(hash); }