Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
            public override int GetHashCode()
            {
                int hash = 13;

                hash = (hash * 7) + Property1.GetHashCode();
                hash = (hash * 7) + Property2.GetHashCode();
                hash = (hash * 7) + Property3.GetHashCode();
                return(hash);
            }
Ejemplo n.º 3
0
 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);
     }
 }