示例#1
0
 public static bool Equals(FInt lhs, FInt rhs)
 {
     if ((object)lhs == rhs)
     {
         return(true);
     }
     else if (null == lhs || null == rhs)
     {
         return(false);
     }
     else
     {
         return(rhs._value == lhs._value);
     }
 }
示例#2
0
        public override bool Equals(object other)
        {
            FInt castedOther = other as FInt;

            FAssert.IsNotNull(castedOther, $"Other is not type of {nameof(FInt)}");

            if (other == null || castedOther == null)
            {
                return(false);
            }
            else if ((object)this == other)
            {
                return(true);
            }
            else
            {
                return(_value == castedOther._value);
            }
        }