/** * 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); }
/** * 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); }
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"); }
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); }