ToSqlSingle() public method

public ToSqlSingle ( ) : SqlSingle
return SqlSingle
Example #1
0
		public void ToSqlSingle()
		{
	    
			SqlByte TestByte12 = new SqlByte(12);
			SqlByte TestByte0 = new SqlByte(0);
			SqlByte TestByte228 = new SqlByte(228);

			Assert.AreEqual((float)12, TestByte12.ToSqlSingle().Value, "ToSqlSingle method 1" + Error);
			Assert.AreEqual((float)0, TestByte0.ToSqlSingle().Value, "ToSqlSingle method 2" + Error);
			Assert.AreEqual((float)228, TestByte228.ToSqlSingle().Value, "ToSqlSingle method 3" + Error);

		}
Example #2
0
		/// <summary>Converts the value from <c>SqlByte</c> to an equivalent <c>SqlSingle</c> value.</summary>
		public static SqlSingle ToSqlSingle(SqlByte    p) { return p.ToSqlSingle();                                                                     }
Example #3
0
 /// <summary>
 /// Converts the value of the specified SqlByte to its equivalent SqlSingle representation.
 /// </summary>
 /// <param name="value">An SqlByte.</param>
 /// <returns>The equivalent SqlSingle.</returns>
 public static SqlSingle ToSqlSingle(SqlByte value) { return value.ToSqlSingle(); }
Example #4
0
        public void ToSqlSingle()
        {
            SqlByte TestByte12 = new SqlByte(12);
            SqlByte TestByte0 = new SqlByte(0);
            SqlByte TestByte228 = new SqlByte(228);

            Assert.Equal(12, TestByte12.ToSqlSingle().Value);
            Assert.Equal(0, TestByte0.ToSqlSingle().Value);
            Assert.Equal(228, TestByte228.ToSqlSingle().Value);
        }