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