public int HashHelpers() { var hash = Property1.GetHashCode(); hash = Combine(hash, Property2?.GetHashCode(StringComparison.Ordinal) ?? 0); hash = Combine(hash, Property3.GetHashCode()); hash = Combine(hash, Property4); return(hash); }
public override int GetHashCode() { int hash = 13; hash = (hash * 7) + Property1.GetHashCode(); hash = (hash * 7) + Property2.GetHashCode(); hash = (hash * 7) + Property3.GetHashCode(); return(hash); }
public int ReSharper() { unchecked { var hash = Property1.GetHashCode(); hash = (hash * 397) ^ (Property2?.GetHashCode(StringComparison.Ordinal) ?? 0); hash = (hash * 397) ^ Property3.GetHashCode(); hash = (hash * 397) ^ Property4; return(hash); } }
public override int GetHashCode() { #if NET461 || NETSTANDARD2_0 var hashcode = 35203352; var offset = -1521134295; hashcode *= offset + Property1.GetHashCode(); hashcode *= offset + Property2.GetHashCode(); return(hashcode); #else return(HashCode.Combine(Property1, Property2)); #endif }
public override int GetHashCode() { return(Property1.GetHashCode()); // minimal but sufficient }
public override int GetHashCode() { return(Property1.GetHashCode()); }
public override int GetHashCode() { return(HashCode.Aggregate(Property1.GetHashCode(), Property2.GetHashCode())); }