ToSqlInt32() public method

public ToSqlInt32 ( ) : SqlInt32
return SqlInt32
Beispiel #1
0
        public static SqlByte op_Explicit(SqlMoney x)
        {
            if (x.IsNull)
            {
                return(SqlByte.Null);
            }

            int val = x.ToSqlInt32().Value;

            if (val < 0 || val > 255)
            {
                throw new OverflowException("Arithmetic Overflow.");
            }

            return(new SqlByte((byte)val));
        }
Beispiel #2
0
 /// <summary>
 /// Converts the value of the specified SqlMoney to its equivalent SqlInt32 representation.
 /// </summary>
 /// <param name="value">An SqlMoney.</param>
 /// <returns>The equivalent SqlInt32.</returns>
 public static SqlInt32 ToSqlInt32(SqlMoney value) { return value.ToSqlInt32(); }
		/// <summary>Converts the value from <c>SqlMoney</c> to an equivalent <c>SqlInt32</c> value.</summary>
		public static SqlInt32 ToSqlInt32(SqlMoney   p) { return p.ToSqlInt32();                                                                    }
Beispiel #4
0
        public static SqlByte op_Explicit(SqlMoney x)
        {
            if(x.IsNull)
                return SqlByte.Null;

            int val = x.ToSqlInt32().Value;
            if (val < 0 || val > 255)
                throw new OverflowException("Arithmetic Overflow.");

            return new SqlByte((byte)val);
        }