示例#1
0
        protected override bool Equals(IVariant other)
        {
            FBool castedOther = other as FBool;

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

            return(this._value == castedOther._value);
        }
示例#2
0
 public static bool Equals(FBool lhs, FBool rhs)
 {
     if ((object)lhs == rhs)
     {
         return(true);
     }
     else if (null == lhs || null == rhs)
     {
         return(false);
     }
     else
     {
         return(rhs._value == lhs._value);
     }
 }
示例#3
0
        protected override int CompareTo(IVariant other)
        {
            FBool castedOther = other as FBool;

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

            if (this._value == castedOther._value)
            {
                return(0);
            }
            else
            {
                return(-1);
            }
        }
示例#4
0
        public override bool Equals(object other)
        {
            FBool castedOther = other as FBool;

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

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