public override bool Equals(object anotherObject) { if (anotherObject == null) { return(false); } if (ReferenceEquals(this, anotherObject)) { return(true); } if (this.GetType() != anotherObject.GetType()) { return(false); } Call anotherCall = (Call)anotherObject; bool contactIsTheSame = Contact.Equals(anotherCall.Contact); bool callDirectionIsTheSame = CallDirection.CompareTo(anotherCall.CallDirection) == 0; return(contactIsTheSame && callDirectionIsTheSame); }