CompareTo() public method

public CompareTo ( SqlBinary value ) : int
value SqlBinary
return int
        /**
         * Compares two instances of SqlBinary to determine if the first is less than or equal to the second.
         * @param x A SqlBinary instance
         * @param y A SqlBinary instance
         * @return A SqlBoolean that is True if the first instance is less than or equal to the second instance, otherwise False.
         * If either instance of SqlDouble is null, the Value of the SqlBoolean will be Null.
         */
        public static SqlBoolean LessThanOrEqual(SqlBinary x, SqlBinary y)
        {
            if (x.IsNull || y.IsNull)
            {
                return(SqlBoolean.Null);
            }

            int i = x.CompareTo(y);

            if (i > 0)
            {
                return(SqlBoolean.False);
            }

            return(SqlBoolean.True);
        }
Esempio n. 2
0
        /**
         * Compares two instances of SqlBinary to determine if the first is less than or equal to the second.
         * @param x A SqlBinary instance
         * @param y A SqlBinary instance
         * @return A SqlBoolean that is True if the first instance is less than or equal to the second instance, otherwise False.
         * If either instance of SqlDouble is null, the Value of the SqlBoolean will be Null.
         */
        public static SqlBoolean LessThanOrEqual(SqlBinary x, SqlBinary y)
        {
            if (x.IsNull || y.IsNull)
                return SqlBoolean.Null;

            int i = x.CompareTo(y);

            if ( i > 0)
                return SqlBoolean.False;

            return SqlBoolean.True;
        }