Equals() 공개 정적인 메소드

public static Equals ( SqlSingle x, SqlSingle y ) : SqlBoolean
x SqlSingle
y SqlSingle
리턴 SqlBoolean
예제 #1
0
파일: SqlSingle.cs 프로젝트: raj581/Marvin
        /**
         * Performs a logical comparison on two instances of SqlSingle to determine if they are equal.
         * @param x A SqlSingle instance.
         * @param y A SqlSingle 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(SqlSingle x, SqlSingle y)
        {
            if (x.IsNull || y.IsNull)
            {
                return(SqlBoolean.Null);
            }

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

            return(SqlBoolean.False);
        }
예제 #2
0
파일: SqlSingle.cs 프로젝트: runefs/Marvin
        /**
         * Performs a logical comparison on two instances of SqlSingle to determine if they are equal.
         * @param x A SqlSingle instance.
         * @param y A SqlSingle 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(SqlSingle x, SqlSingle y)
        {
            if (x.IsNull || y.IsNull)
                return SqlBoolean.Null;

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

            return SqlBoolean.False;
        }
                public void EqualsMethods()
                {
                        SqlSingle Test0 = new SqlSingle (0);
                        SqlSingle Test1 = new SqlSingle (1.58e30);
                        SqlSingle Test2 = new SqlSingle (1.8e32);
                        SqlSingle Test22 = new SqlSingle (1.8e32);

                        Assert ("#F01", !Test0.Equals (Test1));
                        Assert ("#F02", !Test1.Equals (Test2));
                        Assert ("#F03", !Test2.Equals (new SqlString ("TEST")));
                        Assert ("#F04", Test2.Equals (Test22));

                        // Static Equals()-method
                        Assert ("#F05", SqlSingle.Equals (Test2, Test22).Value);
                        Assert ("#F06", !SqlSingle.Equals (Test1, Test2).Value);
                }
예제 #4
0
                public void EqualsMethods()
                {
                        SqlSingle Test0 = new SqlSingle (0);
                        SqlSingle Test1 = new SqlSingle (1.58e30);
                        SqlSingle Test2 = new SqlSingle (1.8e32);
                        SqlSingle Test22 = new SqlSingle (1.8e32);

                        Assert.IsTrue (!Test0.Equals (Test1), "#F01");
                        Assert.IsTrue (!Test1.Equals (Test2), "#F02");
                        Assert.IsTrue (!Test2.Equals (new SqlString ("TEST")), "#F03");
                        Assert.IsTrue (Test2.Equals (Test22), "#F04");

                        // Static Equals()-method
                        Assert.IsTrue (SqlSingle.Equals (Test2, Test22).Value, "#F05");
                        Assert.IsTrue (!SqlSingle.Equals (Test1, Test2).Value, "#F06");
                }
예제 #5
0
        public void EqualsMethods()
        {
            SqlSingle Test0 = new SqlSingle(0);
            SqlSingle Test1 = new SqlSingle(1.58e30);
            SqlSingle Test2 = new SqlSingle(1.8e32);
            SqlSingle Test22 = new SqlSingle(1.8e32);

            Assert.True(!Test0.Equals(Test1));
            Assert.True(!Test1.Equals(Test2));
            Assert.True(!Test2.Equals(new SqlString("TEST")));
            Assert.True(Test2.Equals(Test22));

            // Static Equals()-method
            Assert.True(SqlSingle.Equals(Test2, Test22).Value);
            Assert.True(!SqlSingle.Equals(Test1, Test2).Value);
        }