Example #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);
        }
Example #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);
     }
 }
Example #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);
            }
        }
Example #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);
            }
        }