Exemplo n.º 1
0
        public static void BitwiseHashCodeForLong()
        {
            var i        = 20L;
            var hashCode = BitwiseComparer <long> .GetHashCode(i, false);

            Equal(i, hashCode);
            hashCode = BitwiseComparer <long> .GetHashCode(i, true);

            NotEqual(i, hashCode);
        }
Exemplo n.º 2
0
        public static void BitwiseHashCodeForInt()
        {
            var i        = 20;
            var hashCode = BitwiseComparer <int> .GetHashCode(i, false);

            Equal(i, hashCode);
            hashCode = BitwiseComparer <int> .GetHashCode(i, true);

            NotEqual(i, hashCode);
        }
Exemplo n.º 3
0
        public static void BitwiseHashCodeForGuid()
        {
            var value = Guid.NewGuid();

            BitwiseComparer <Guid> .GetHashCode(value, false);
        }