public override bool Equals(object obj) { var cpl = obj as FakeAgentDisplayRule; if (cpl == null) { return(false); } return(LetterType.Equals(cpl.LetterType) && TransactionPropertyState.Equals(cpl.TransactionPropertyState) && TransactionType.Equals(cpl.TransactionType) && Underwriter.Equals(cpl.Underwriter)); }
public override int GetHashCode() { unchecked { // Choose large primes to avoid hashing collisions const int hashingBase = (int)2166136261; const int hashingMultiplier = 16777619; int hash = hashingBase; hash = (hash * hashingMultiplier) ^ (!ReferenceEquals(null, LetterType) ? LetterType.GetHashCode() : 0); hash = (hash * hashingMultiplier) ^ (!ReferenceEquals(null, TransactionPropertyState) ? TransactionPropertyState.GetHashCode() : 0); hash = (hash * hashingMultiplier) ^ (!ReferenceEquals(null, TransactionType) ? TransactionType.GetHashCode() : 0); hash = (hash * hashingMultiplier) ^ (!ReferenceEquals(null, Underwriter) ? Underwriter.GetHashCode() : 0); return(hash); } }