Пример #1
0
        public static void EqualsTest(nuint value, object obj, bool expected)
        {
            if (obj is nuint other)
            {
                Assert.Equal(expected, value == other);
                Assert.Equal(!expected, value != other);
                Assert.Equal(expected, value.GetHashCode().Equals(other.GetHashCode()));

                IEquatable <nuint> iEquatable = value;
                Assert.Equal(expected, iEquatable.Equals((nuint)obj));
            }
            Assert.Equal(expected, value.Equals(obj));
            Assert.Equal(value.GetHashCode(), value.GetHashCode());
        }
Пример #2
0
        public override int GetHashCode()
        {
            int hashCode = 73224550;

            hashCode = hashCode * -1521134295 + line.GetHashCode();
            hashCode = hashCode * -1521134295 + column.GetHashCode();
            return(hashCode);
        }
Пример #3
0
 public override int GetHashCode() => Value.GetHashCode();
Пример #4
0
 /// <inheritdoc cref="object.GetHashCode" />
 public override int GetHashCode() =>
 UseInt?_intValue.GetHashCode() : _pointerValue.GetHashCode();