public override int GetHashCode() { unchecked { var hashCode = Chromosome?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ Start; hashCode = (hashCode * 397) ^ (ID?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (RefAllele?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (AltAllele?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Gene?.GetHashCode() ?? 0); return(hashCode); } }
public override bool Equals(object other) { var otherItem = other as CustomItem; if (otherItem == null) { return(false); } return(Chromosome.Equals(otherItem.Chromosome) && Start.Equals(otherItem.Start) && RefAllele.Equals(otherItem.RefAllele) && AltAllele.Equals(otherItem.AltAllele) && AnnotationType.Equals(otherItem.AnnotationType)); }