Exemplo n.º 1
0
 public Boolean Equals(TryResult <T> other)
 {
     return(Success.Equals(other.Success) && Result.Equals(other.Result));
 }
Exemplo n.º 2
0
        public void Equals_OnBoxedResult_BehavesCorrectly()
        {
            object left = new Result<int, string>(7);
            object right = new Result<int, string>(7);

            Assert.IsTrue(left.Equals(right));
            Assert.IsFalse(left.Equals(null));
            Assert.IsTrue(left.Equals(7));
            Assert.IsFalse(left.Equals(42));
            Assert.IsFalse(left.Equals("Hello World!"));
        }