Beispiel #1
0
        public override int GetHashCode()
        {
            var hashCode = 291051517;

            hashCode = hashCode * -1521134295 + Int.GetHashCode();
            hashCode = hashCode * -1521134295 + Long.GetHashCode();
            hashCode = hashCode * -1521134295 + Short.GetHashCode();
            hashCode = hashCode * -1521134295 + UInt.GetHashCode();
            hashCode = hashCode * -1521134295 + ULong.GetHashCode();
            hashCode = hashCode * -1521134295 + UShort.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <int?> .Default.GetHashCode(NullableInt);

            hashCode = hashCode * -1521134295 + Byte.GetHashCode();
            hashCode = hashCode * -1521134295 + SByte.GetHashCode();
            hashCode = hashCode * -1521134295 + Bool.GetHashCode();
            hashCode = hashCode * -1521134295 + Float.GetHashCode();
            hashCode = hashCode * -1521134295 + Double.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <byte[]> .Default.GetHashCode(ByteArray);

            hashCode = hashCode * -1521134295 + Decimal.GetHashCode();
            hashCode = hashCode * -1521134295 + DateTime.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(String);

            return(hashCode);
        }
Beispiel #2
0
        public override int GetHashCode()
        {
            var hash = 19;

            hash = hash * 7 + Bool.GetHashCode();
            hash = hash * 7 + Int.GetHashCode();
            hash = hash * 7 + UInt.GetHashCode();
            hash = hash * 7 + Float.GetHashCode();
            hash = hash * 7 + Char.GetHashCode();
            hash = hash * 7 + Str.GetHashCode();

            return(hash);
        }
Beispiel #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Byte.GetHashCode();
         hashCode = (hashCode * 397) ^ SByte.GetHashCode();
         hashCode = (hashCode * 397) ^ Short.GetHashCode();
         hashCode = (hashCode * 397) ^ UShort.GetHashCode();
         hashCode = (hashCode * 397) ^ Int.GetHashCode();
         hashCode = (hashCode * 397) ^ UInt.GetHashCode();
         hashCode = (hashCode * 397) ^ Long.GetHashCode();
         hashCode = (hashCode * 397) ^ ULong.GetHashCode();
         return(hashCode);
     }
 }
Beispiel #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Byte != null ? Byte.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SByte != null ? SByte.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Short != null ? Short.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (UShort != null ? UShort.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Int != null ? Int.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (UInt != null ? UInt.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Long != null ? Long.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ULong != null ? ULong.GetHashCode() : 0);
         return(hashCode);
     }
 }