ToSqlMoney() public method

public ToSqlMoney ( ) : SqlMoney
return SqlMoney
Beispiel #1
0
		public void ToSqlMoney()
		{

			SqlByte TestByte12 = new SqlByte(12);
			SqlByte TestByte0 = new SqlByte(0);
			SqlByte TestByte228 = new SqlByte(228);

			Assert.AreEqual(12.0000M, TestByte12.ToSqlMoney().Value, "ToSqMoney method 1" + Error);
			Assert.AreEqual((decimal)0, TestByte0.ToSqlMoney().Value, "ToSqlMoney method 2" + Error);
			Assert.AreEqual(228.0000M, TestByte228.ToSqlMoney().Value, "ToSqlMoney method 3" + Error);
		}
		/// <summary>Converts the value from <c>SqlByte</c> to an equivalent <c>SqlMoney</c> value.</summary>
		public static SqlMoney ToSqlMoney(SqlByte    p) { return p.ToSqlMoney();                                            }
Beispiel #3
0
 /// <summary>
 /// Converts the value of the specified SqlByte to its equivalent SqlMoney representation.
 /// </summary>
 /// <param name="value">An SqlByte.</param>
 /// <returns>The equivalent SqlMoney.</returns>
 public static SqlMoney ToSqlMoney(SqlByte value) { return value.ToSqlMoney(); }
Beispiel #4
0
        public void ToSqlMoney()
        {
            SqlByte TestByte12 = new SqlByte(12);
            SqlByte TestByte0 = new SqlByte(0);
            SqlByte TestByte228 = new SqlByte(228);

            Assert.Equal(12.0000M, TestByte12.ToSqlMoney().Value);
            Assert.Equal(0, TestByte0.ToSqlMoney().Value);
            Assert.Equal(228.0000M, TestByte228.ToSqlMoney().Value);
        }