public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } if (obj.GetType() != GetType()) { return(false); } var value = obj as AllObjectCollections; if (value == null) { return(false); } return (Prop0 != null && value.Prop0 != null && Prop0.Equals(value.Prop0) && Prop1 != null && value.Prop1 != null && Prop1.Equals(value.Prop1) && Prop2 != null && value.Prop2 != null && Prop2.Equals(value.Prop2) && Prop3 != null && value.Prop3 != null && Prop3.Equals(value.Prop3) && Prop4 != null && value.Prop4 != null && Prop4.Equals(value.Prop4) && Prop5 != null && value.Prop5 != null && Prop5.Equals(value.Prop5) && Prop6 != null && value.Prop6 != null && Prop6.Equals(value.Prop6) && Prop7 != null && value.Prop7 != null && Prop7.Equals(value.Prop7) && Prop8 != null && value.Prop8 != null && Prop8.Equals(value.Prop8) && Prop9 != null && value.Prop9 != null && Prop9.Equals(value.Prop9) && Prop10 != null && value.Prop10 != null && Prop10.Equals(value.Prop10) && Prop11 != null && value.Prop11 != null && Prop11.Equals(value.Prop11)); }
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) ^ (!object.ReferenceEquals(null, Prop0) ? Prop0.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop1) ? Prop1.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop2) ? Prop2.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop3) ? Prop3.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop4) ? Prop4.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop5) ? Prop5.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop6) ? Prop6.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop7) ? Prop7.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop8) ? Prop8.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop9) ? Prop9.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop10) ? Prop10.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Prop11) ? Prop11.GetHashCode() : 0); return(hash); } }