public override bool Equals(object obj) { if (!(obj is Renter)) { return(false); } Renter other = obj as Renter; return(IdRenter.Equals(other.IdRenter) && LibraryNumber.Equals(other.libraryNumber) && cpEmail.Equals(other.cpEmail)); }
public override int GetHashCode() { unchecked { int hashCode = (int)LibraryType; hashCode = (hashCode * 397) ^ LibraryNumber.GetHashCode(); hashCode = (hashCode * 397) ^ LibraryId.GetHashCode(); hashCode = (hashCode * 397) ^ (int)UpdateFlags; hashCode = (hashCode * 397) ^ (AffectedElements?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (AffectedLibraries?.GetHashCode() ?? 0); return(hashCode); } }