public bool Equals(ValidationReport other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } var issues = Issues.ToList(); var otherIssues = other.Issues.ToList(); if (issues.Count != otherIssues.Count) { return(false); } for (int i = 0; i < issues.Count; i++) { if (!issues[i].Equals(otherIssues[i])) { return(false); } } var subreports = SubReports.ToList(); var otherSubreports = other.SubReports.ToList(); if (subreports.Count != otherSubreports.Count) { return(false); } for (int i = 0; i < subreports.Count; i++) { if (!subreports[i].Equals(otherSubreports[i])) { return(false); } } return(true); }