Esempio n. 1
0
        public override bool Equals(object obj)
        {
            NumberOrString other = obj as NumberOrString;

            return(other == null ? false : Equals(other));
        }
Esempio n. 2
0
 public bool Equals(NumberOrString other) =>
 (IsLeft && other.IsLeft) ? (Left == other.Left) :
 (IsRight && other.IsRight) ? (Right == other.Right) :
 (!IsLeft && !IsRight && !other.IsLeft && !other.IsRight);     // None == None
Esempio n. 3
0
 public bool Equals(NumberOrString other)
 {
     return(IsLeft && other.IsLeft ? Left == other.Left :
            IsRight && other.IsRight ? Right == other.Right :
            !IsLeft && !IsRight && !other.IsLeft && !other.IsRight);
 }