Example #1
0
        public void UncertainValueEquality()
        {
            Assert.IsTrue(a == a);
            Assert.IsTrue(a.Equals(a));
            Assert.IsTrue(a.Equals((object)a));

            Assert.IsTrue(a != b);
            Assert.IsTrue(!a.Equals(b));
            Assert.IsTrue(!a.Equals((object)b));

            Assert.IsTrue(!a.Equals(null));

            Assert.IsTrue(a.GetHashCode() != b.GetHashCode());
        }
 /// <summary>
 /// Gets a hash code for the data point.
 /// </summary>
 /// <returns>A hash code for the data point.</returns>
 public override int GetHashCode()
 {
     return(x.GetHashCode() ^ y.GetHashCode());
 }