Equals() public static method

public static Equals ( SqlDecimal x, SqlDecimal y ) : SqlBoolean
x SqlDecimal
y SqlDecimal
return SqlBoolean
Example #1
0
        /**
         * Performs a logical comparison on two instances of SqlDecimal to determine if they are equal.
         * @param x A SqlDecimal instance.
         * @param y A SqlDecimal instance.
         * @return true if the two values are equal, otherwise false.
         * If one of the parameters is null or null value return SqlBoolean.Null.
         */
        public static SqlBoolean Equals(SqlDecimal x, SqlDecimal y)
        {
            if (x.IsNull || y.IsNull)
            {
                return(SqlBoolean.Null);
            }

            if (x.Equals(y))
            {
                return(SqlBoolean.True);
            }

            return(SqlBoolean.False);
        }
Example #2
0
        /**
         * Performs a logical comparison on two instances of SqlDecimal to determine if they are equal.
         * @param x A SqlDecimal instance.
         * @param y A SqlDecimal instance.
         * @return true if the two values are equal, otherwise false.
         * If one of the parameters is null or null value return SqlBoolean.Null.
         */
        public static SqlBoolean Equals(SqlDecimal x, SqlDecimal y)
        {
            if (x.IsNull || y.IsNull)
                return SqlBoolean.Null;

            if (x.Equals(y))
                return SqlBoolean.True;

            return SqlBoolean.False;
        }