ToSqlInt16() public method

public ToSqlInt16 ( ) : SqlInt16
return SqlInt16
Esempio n. 1
0
		public void ToSqlInt16()
		{

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

			Assert.AreEqual((short)12, TestByte12.ToSqlInt16().Value, "ToSqInt16 method 1" + Error);
			Assert.AreEqual((short)0, TestByte0.ToSqlInt16().Value, "ToSqlInt16 method 2" + Error);
			Assert.AreEqual((short)228, TestByte228.ToSqlInt16().Value, "ToSqlInt16 method 3" + Error);
		}
Esempio n. 2
0
		/// <summary>Converts the value from <c>SqlByte</c> to an equivalent <c>SqlInt16</c> value.</summary>
		public static SqlInt16 ToSqlInt16(SqlByte    p) { return p.ToSqlInt16();                                                                    }
Esempio n. 3
0
 /// <summary>
 /// Converts the value of the specified SqlByte to its equivalent SqlInt16 representation.
 /// </summary>
 /// <param name="value">An SqlByte.</param>
 /// <returns>The equivalent SqlInt16.</returns>
 public static SqlInt16 ToSqlInt16(SqlByte value) { return value.ToSqlInt16(); }
Esempio n. 4
0
        public void ToSqlInt16()
        {
            SqlByte TestByte12 = new SqlByte(12);
            SqlByte TestByte0 = new SqlByte(0);
            SqlByte TestByte228 = new SqlByte(228);

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