37 instantiations of SqlDecimal
System.Data (37)
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (2)
1882SetSqlDecimal_Unchecked(sink, setters, i, new SqlDecimal(reader.GetDecimal(i))); 3312setters.SetSqlDecimal( sink, ordinal, new SqlDecimal( value ) );
fx\src\data\System\Data\Common\SQLTypes\SQLDecimalStorage.cs (1)
188SqlDecimal newValue = new SqlDecimal();
fx\src\data\System\Data\Sql\SqlMetaData.cs (2)
776SqlDecimal sdValue = InternalAdjustSqlDecimal(new SqlDecimal(value)); 1140SqlDecimal sd = new SqlDecimal((Decimal)value);
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (1)
520return new SqlDecimal(_value._numericInfo.precision,
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (8)
883value = new SqlDecimal(_SqlDataReaderRowSource.GetSqlDouble(sourceOrdinal).Value); 886value = new SqlDecimal(_SqlDataReaderRowSource.GetSqlSingle(sourceOrdinal).Value); 947return new SqlDecimal(((SqlSingle)currentRowValue).Value); 953return new SqlDecimal(f); 960return new SqlDecimal(((SqlDouble)currentRowValue).Value); 966return new SqlDecimal(d); 977return new SqlDecimal((Decimal)currentRowValue); 1355sqlValue = new SqlDecimal((Decimal)value);
fx\src\data\System\Data\SqlClient\SqlEnums.cs (1)
519sqlVal = new SqlDecimal((Decimal)comVal);
fx\src\data\System\Data\SqlClient\TdsParser.cs (2)
6395SqlDecimal num = new SqlDecimal(value); 8230SqlDecimal sqlValue = new SqlDecimal((Decimal)value);
fx\src\data\System\Data\SQLTypes\SQLDecimal.cs (19)
1145return new SqlDecimal(x); 1150return new SqlDecimal(x); 1155return new SqlDecimal(new Decimal(x)); 1327SqlDecimal ret = new SqlDecimal(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos); 1525ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ResScale, fResPositive); 1553ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ActualScale, fResPositive); 1570ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ResScale, fResPositive); 1685SqlDecimal ret = new SqlDecimal(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos); 1704return x.IsNull ? Null : new SqlDecimal((int)x.ByteValue); 1712return x.IsNull ? Null : new SqlDecimal((int)(x.Value)); 1720return x.IsNull ? Null : new SqlDecimal((int)(x.Value)); 1728return x.IsNull ? Null : new SqlDecimal(x.Value); 1736return x.IsNull ? Null : new SqlDecimal(x.Value); 1744return x.IsNull ? Null : new SqlDecimal(x.ToDecimal()); 1755return x.IsNull ? SqlDecimal.Null : new SqlDecimal((double)(x.Value)); 1763return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 3046if (n == new SqlDecimal(0)) 3152n = new SqlDecimal(Math.Pow(dBaseNum, exp)); 3301public static readonly SqlDecimal Null = new SqlDecimal(true);
fx\src\data\System\Data\SQLTypes\SQLMoney.cs (1)
106SqlDecimal snum = new SqlDecimal(value);
297 references to SqlDecimal
System.Data (296)
fx\src\data\Microsoft\SqlServer\Server\ITypedGetters.cs (1)
71SqlDecimal GetSqlDecimal( int ordinal );
fx\src\data\Microsoft\SqlServer\Server\ITypedGettersV3.cs (1)
64SqlDecimal GetSqlDecimal( SmiEventSink sink, int ordinal );
fx\src\data\Microsoft\SqlServer\Server\ITypedSetters.cs (1)
70void SetSqlDecimal( int ordinal, SqlDecimal value );
fx\src\data\Microsoft\SqlServer\Server\ITypedSettersV3.cs (1)
73void SetSqlDecimal( SmiEventSink sink, int ordinal, SqlDecimal value );
fx\src\data\Microsoft\SqlServer\Server\MemoryRecordBuffer.cs (2)
100public override SqlDecimal GetSqlDecimal(SmiEventSink sink, int ordinal) { 197public override void SetSqlDecimal(SmiEventSink sink, int ordinal, SqlDecimal value) {
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (11)
124ht.Add( typeof( SqlDecimal ), ExtendedClrTypeCode.SqlDecimal ); 273else if (value.GetType() == typeof( SqlDecimal )) 646if (column.DataType == typeof(SqlDecimal)) { 655SqlDecimal value = (SqlDecimal) obj; 671if (SqlDecimal.MaxPrecision < precision) { 691SqlDecimal value = (SqlDecimal)(Decimal)obj; 705if (SqlDecimal.MaxPrecision < precision) { 897precision > SqlDecimal.MaxPrecision || 899scale > SqlDecimal.MaxScale ||
fx\src\data\Microsoft\SqlServer\Server\SmiMetaData.cs (2)
382Debug.Assert( MinPrecision <= precision && SqlDecimal.MaxPrecision >= precision, "Invalid precision: " + precision ); 383Debug.Assert( MinScale <= scale && SqlDecimal.MaxScale >= scale, "Invalid scale: " + scale );
fx\src\data\Microsoft\SqlServer\Server\SmiRecordBuffer.cs (2)
342public virtual SqlDecimal GetSqlDecimal( int ordinal ) { 695public virtual void SetSqlDecimal( int ordinal, SqlDecimal value ) {
fx\src\data\Microsoft\SqlServer\Server\SmiRequestExecutor.cs (2)
400public virtual SqlDecimal GetSqlDecimal( int ordinal ) { 753public virtual void SetSqlDecimal( int ordinal, SqlDecimal value ) {
fx\src\data\Microsoft\SqlServer\Server\SmiTypedGetterSetter.cs (2)
171public virtual SqlDecimal GetSqlDecimal(SmiEventSink sink, int ordinal) { 371public virtual void SetSqlDecimal(SmiEventSink sink, int ordinal, SqlDecimal value) {
fx\src\data\Microsoft\SqlServer\Server\SqlDataRecord.cs (2)
338public virtual SqlDecimal GetSqlDecimal(int ordinal) { 543public virtual void SetSqlDecimal(int ordinal, SqlDecimal value) {
fx\src\data\Microsoft\SqlServer\Server\SqlRecordBuffer.cs (4)
254internal SqlDecimal SqlDecimal { 259return (SqlDecimal)_object; 364case StorageType.SqlDecimal: return new SmiMetaData(SqlDbType.Decimal, 17, ((SqlDecimal)_object).Precision, ((SqlDecimal)_object).Scale, 0, SqlCompareOptions.None, null);
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (11)
457internal static SqlDecimal GetSqlDecimal( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal, SmiMetaData metaData ) { 458SqlDecimal result; 461result = SqlDecimal.Null; 472result = (SqlDecimal) obj; 1089SqlDecimal.Null, // SqlDbType.Decimal 1199SqlDecimal dec = GetSqlDecimal_Unchecked( sink, getters, ordinal ); 1492internal static void SetSqlDecimal( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlDecimal value ) { 1626case ExtendedClrTypeCode.SqlDecimal: SetSqlDecimal_Unchecked( sink, setters, ordinal, (SqlDecimal) value ); break; 3153private static SqlDecimal GetSqlDecimal_Unchecked( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal ) { 3156SqlDecimal result = getters.GetSqlDecimal( sink, ordinal ); 3488private static void SetSqlDecimal_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SqlDecimal value ) {
fx\src\data\System\Data\ColumnTypeConverter.cs (1)
47typeof(SqlDecimal),
fx\src\data\System\Data\Common\AdapterUtil.cs (1)
1584static internal ArgumentException ParameterValueOutOfRange(SqlDecimal value) {
fx\src\data\System\Data\Common\DataStorage.cs (1)
105typeof(SqlDecimal),
fx\src\data\System\Data\Common\SQLConvert.cs (8)
160return (SqlDecimal)value; 166public static SqlDecimal ConvertToSqlDecimal(object value) { 169return SqlDecimal.Null; 176return (SqlDecimal)value; 204throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlDecimal)); 246return (SqlDecimal)value; 636return SqlDecimal.Parse((string)value); // parses invariant format and is larger has larger range then Decimal 725return ((SqlDecimal)value).ToString(); // converts using invariant format and is larger has larger range then Decimal
fx\src\data\System\Data\Common\SQLTypes\SQLDecimalStorage.cs (25)
22private SqlDecimal[] values; 25: base(column, typeof(SqlDecimal), SqlDecimal.Null, SqlDecimal.Null, StorageType.SqlDecimal) { 33SqlDecimal sum = 0; 46SqlDecimal meanSum = 0; 56SqlDecimal mean = 0; 57checked {mean = (meanSum /(SqlDecimal) meanCount);} 99SqlDecimal min = SqlDecimal.MaxValue; 104if ((SqlDecimal.LessThan(values[record], min)).IsTrue) 114SqlDecimal max = SqlDecimal.MinValue; 119if ((SqlDecimal.GreaterThan(values[record], max)).IsTrue) 143throw ExprException.Overflow(typeof(SqlDecimal)); 153return values[recordNo].CompareTo((SqlDecimal)value); 180SqlDecimal[] newValues = new SqlDecimal[capacity]; 188SqlDecimal newValue = new SqlDecimal(); 197return ((SqlDecimal)tmp); 202Debug.Assert((value.GetType() == typeof(SqlDecimal)), "wrong input type"); 213return new SqlDecimal[recordCount]; 217SqlDecimal[] typedStore = (SqlDecimal[]) store; 223values = (SqlDecimal[]) store;
fx\src\data\System\Data\Common\SQLTypes\SQLInt64Storage.cs (2)
46SqlDecimal meanSum = 0; 57checked {mean = (meanSum /(SqlDecimal) meanCount).ToSqlInt64();}
fx\src\data\System\Data\Common\SQLTypes\SQLMoneyStorage.cs (3)
33SqlDecimal sum = 0; 46SqlDecimal meanSum = 0; 57checked {mean = (meanSum / (SqlDecimal)meanCount).ToSqlMoney();}
fx\src\data\System\Data\DataColumn.cs (1)
1563(dataType == typeof(SqlInt32)) || (dataType == typeof(SqlInt64)) || (dataType == typeof(SqlInt16)) || (dataType == typeof(SqlDecimal)));
fx\src\data\System\Data\Filter\UnaryNode.cs (1)
89value = -(SqlDecimal) vl;
fx\src\data\System\Data\Odbc\OdbcParameter.cs (1)
480byte precision = ((SqlDecimal)(decimal)value).Precision;
fx\src\Data\System\Data\ProviderBase\DbParameterHelper.cs (1)
237return ((System.Data.SqlTypes.SqlDecimal)(Decimal) value).Precision; // WebData 102913
fx\src\data\System\Data\Sql\SqlMetaData.cs (15)
601if (precision > SqlDecimal.MaxPrecision || scale > precision) 604if (scale > SqlDecimal.MaxScale) 776SqlDecimal sdValue = InternalAdjustSqlDecimal(new SqlDecimal(value)); 864public SqlDecimal Adjust(SqlDecimal value) { 1096else if (dataType == typeof(SqlDecimal)) 1097value = this.Adjust((SqlDecimal)value); 1140SqlDecimal sd = new SqlDecimal((Decimal)value); 1225else if (dataType == typeof(SqlDecimal)) 1229SqlDecimal sd = (SqlDecimal) value; 1462private SqlDecimal InternalAdjustSqlDecimal(SqlDecimal value) 1469value = SqlDecimal.AdjustScale(value, Scale - value.Scale, false /* Don't round, truncate. */); 1471return SqlDecimal.ConvertToPrecScale(value, Precision, Scale);
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (4)
514internal SqlDecimal SqlDecimal { 518return SqlDecimal.Null; 529return (SqlDecimal)this.SqlValue; // anything else we haven't thought of goes through boxing. 745case SqlBuffer.StorageType.Decimal: return typeof(SqlDecimal);
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (5)
973return (SqlDecimal)currentRowValue; 1088if (typeof(SqlDecimal) == t || typeof(Decimal) == t) { 1350SqlDecimal sqlValue; 1352sqlValue = (SqlDecimal)value; 1364sqlValue = SqlDecimal.ConvertToPrecScale(sqlValue, precision, sqlValue.Scale);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (1)
2323virtual public SqlDecimal GetSqlDecimal(int i) {
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (1)
779public override SqlDecimal GetSqlDecimal(int ordinal) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (6)
328else if (dataType == typeof(SqlDecimal)) 399else if (sqlType == typeof(SqlDecimal)) return SqlDecimal.Null; 450else if (sqlVal is SqlDecimal) 451comVal = ((SqlDecimal)sqlVal).Value; 785(38, 4, 17, true, false, false, TdsEnums.SQLNUMERICN, TdsEnums.SQLNUMERICN, MetaTypeName.DECIMAL, typeof(System.Decimal), typeof(SqlDecimal), SqlDbType.Decimal, DbType.Decimal, 2);
fx\src\data\System\Data\SqlClient\SqlParameter.cs (6)
1619if (value is SqlDecimal) { 1620if (((SqlDecimal) value).IsNull) // MDAC #79648 1623return ((SqlDecimal)value).Precision; 1629if (value is SqlDecimal) { 1630if (((SqlDecimal) value).IsNull) // MDAC #79648 1633return ((SqlDecimal) value).Scale;
fx\src\data\System\Data\SqlClient\SqlUtil.cs (1)
470return ADP.InvalidOperation(Res.GetString(Res.SqlParameter_InvalidTableDerivedPrecisionForTvp, precision, columnName, System.Data.SqlTypes.SqlDecimal.MaxPrecision));
fx\src\data\System\Data\SqlClient\TdsParser.cs (13)
6383static internal SqlDecimal AdjustSqlDecimalScale(SqlDecimal d, int newScale) { 6385return SqlDecimal.AdjustScale(d, newScale - d.Scale, false /* Don't round, truncate. MDAC 69229 */); 6395SqlDecimal num = new SqlDecimal(value); 6397num = SqlDecimal.AdjustScale(num, newScale - oldScale, false /* Don't round, truncate. MDAC 69229 */); 6404internal byte[] SerializeSqlDecimal(SqlDecimal d, TdsParserStateObject stateObj) { 6433internal void WriteSqlDecimal(SqlDecimal d, TdsParserStateObject stateObj) { 8218value = AdjustSqlDecimalScale((SqlDecimal)value, scale); 8222if (precision < ((SqlDecimal)value).Precision) { 8223throw ADP.ParameterValueOutOfRange((SqlDecimal)value); 8230SqlDecimal sqlValue = new SqlDecimal((Decimal)value); 10066WriteSqlDecimal((SqlDecimal)value, stateObj); 11010return SerializeSqlDecimal((SqlDecimal)value, stateObj);
fx\src\data\System\Data\SqlClient\TdsRecordBufferSetter.cs (1)
161public override void SetSqlDecimal(SmiEventSink sink, int ordinal, SqlDecimal value) {
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (2)
462internal void SetSqlDecimal(SqlDecimal value) { 473_stateObj.Parser.WriteSqlDecimal(SqlDecimal.ConvertToPrecScale(value, _metaData.Precision, _metaData.Scale), _stateObj);
fx\src\data\System\Data\SQLTypes\SQLBoolean.cs (3)
352public static explicit operator SqlBoolean(SqlDecimal x) { 489public SqlDecimal ToSqlDecimal() { 490return (SqlDecimal)this;
fx\src\data\System\Data\SQLTypes\SQLByte.cs (3)
324public static explicit operator SqlByte(SqlDecimal x) { 489public SqlDecimal ToSqlDecimal() { 490return (SqlDecimal)this;
fx\src\data\System\Data\SQLTypes\SQLDecimal.cs (121)
991public static SqlDecimal Parse(String s) { 996return SqlDecimal.Null; 998SqlDecimal snResult = SqlDecimal.Null; 1144public static implicit operator SqlDecimal(Decimal x) { 1149public static explicit operator SqlDecimal(double x) { 1154public static implicit operator SqlDecimal(long x) { 1162public static explicit operator Decimal(SqlDecimal x) { 1171public static SqlDecimal operator -(SqlDecimal x) { 1175SqlDecimal s = x; 1191public static SqlDecimal operator +(SqlDecimal x, SqlDecimal y) { 1327SqlDecimal ret = new SqlDecimal(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos); 1343public static SqlDecimal operator -(SqlDecimal x, SqlDecimal y) { 1383public static SqlDecimal operator *(SqlDecimal x, SqlDecimal y) { 1410SqlDecimal ret; 1615public static SqlDecimal operator /(SqlDecimal x, SqlDecimal y) { 1685SqlDecimal ret = new SqlDecimal(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos); 1703public static explicit operator SqlDecimal(SqlBoolean x) { 1711public static implicit operator SqlDecimal(SqlByte x) { 1719public static implicit operator SqlDecimal(SqlInt16 x) { 1727public static implicit operator SqlDecimal(SqlInt32 x) { 1735public static implicit operator SqlDecimal(SqlInt64 x) { 1743public static implicit operator SqlDecimal(SqlMoney x) { 1754public static explicit operator SqlDecimal(SqlSingle x) { 1755return x.IsNull ? SqlDecimal.Null : new SqlDecimal((double)(x.Value)); 1762public static explicit operator SqlDecimal(SqlDouble x) { 1763return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 1771public static explicit operator SqlDecimal(SqlString x) { 1772return x.IsNull ? Null : SqlDecimal.Parse(x.Value); 2292public static SqlDecimal AdjustScale(SqlDecimal n, int digits, bool fRound) { 2294return SqlDecimal.Null; 2296SqlDecimal ret = n; 2305public static SqlDecimal ConvertToPrecScale(SqlDecimal n, int precision, int scale) { 2310return SqlDecimal.Null; 2312SqlDecimal ret = n; 2360private int LAbsCmp(SqlDecimal snumOp) { 2687SqlDecimal snumOp 2710SqlDecimal snumArg1 = this; 2711SqlDecimal snumArg2 = snumOp; 2769public static SqlBoolean operator==(SqlDecimal x, SqlDecimal y) { 2776public static SqlBoolean operator!=(SqlDecimal x, SqlDecimal y) { 2783public static SqlBoolean operator<(SqlDecimal x, SqlDecimal y) { 2790public static SqlBoolean operator>(SqlDecimal x, SqlDecimal y) { 2797public static SqlBoolean operator<=(SqlDecimal x, SqlDecimal y) { 2809public static SqlBoolean operator>=(SqlDecimal x, SqlDecimal y) { 2824public static SqlDecimal Add(SqlDecimal x, SqlDecimal y) { 2828public static SqlDecimal Subtract(SqlDecimal x, SqlDecimal y) { 2833public static SqlDecimal Multiply(SqlDecimal x, SqlDecimal y) { 2838public static SqlDecimal Divide(SqlDecimal x, SqlDecimal y) { 2843public static SqlBoolean Equals(SqlDecimal x, SqlDecimal y) { 2848public static SqlBoolean NotEquals(SqlDecimal x, SqlDecimal y) { 2853public static SqlBoolean LessThan(SqlDecimal x, SqlDecimal y) { 2858public static SqlBoolean GreaterThan(SqlDecimal x, SqlDecimal y) { 2863public static SqlBoolean LessThanOrEqual(SqlDecimal x, SqlDecimal y) { 2868public static SqlBoolean GreaterThanOrEqual(SqlDecimal x, SqlDecimal y) { 2967public static SqlDecimal Abs(SqlDecimal n) { 2971return SqlDecimal.Null; 2982public static SqlDecimal Ceiling(SqlDecimal n) { 2986return SqlDecimal.Null; 3011public static SqlDecimal Floor(SqlDecimal n) { 3015return SqlDecimal.Null; 3040public static SqlInt32 Sign(SqlDecimal n) { 3053private static SqlDecimal Round(SqlDecimal n, int lPosition, bool fTruncate) { 3055return SqlDecimal.Null; 3124public static SqlDecimal Round(SqlDecimal n, int position) { 3133public static SqlDecimal Truncate(SqlDecimal n, int position) { 3142public static SqlDecimal Power(SqlDecimal n, double exp) { 3146return SqlDecimal.Null; 3172if (value is SqlDecimal) { 3173SqlDecimal i = (SqlDecimal)value; 3177throw ADP.WrongType(value.GetType(), typeof(SqlDecimal)); 3180public int CompareTo(SqlDecimal value) { 3198if (!(value is SqlDecimal)) { 3202SqlDecimal i = (SqlDecimal)value; 3218SqlDecimal ssnumTemp; 3264SqlDecimal dec = Parse(reader.ReadElementString()); 3301public static readonly SqlDecimal Null = new SqlDecimal(true); 3306public static readonly SqlDecimal MinValue = SqlDecimal.Parse("-99999999999999999999999999999999999999"); 3310public static readonly SqlDecimal MaxValue = SqlDecimal.Parse("99999999999999999999999999999999999999");
fx\src\data\System\Data\SQLTypes\SQLDouble.cs (3)
266public static implicit operator SqlDouble(SqlDecimal x) { 409public SqlDecimal ToSqlDecimal() { 410return (SqlDecimal)this;
fx\src\data\System\Data\SQLTypes\SQLInt16.cs (3)
335public static explicit operator SqlInt16(SqlDecimal x) { 498public SqlDecimal ToSqlDecimal() { 499return (SqlDecimal)this;
fx\src\data\System\Data\SQLTypes\SQLInt32.cs (3)
329public static explicit operator SqlInt32(SqlDecimal x) { 510public SqlDecimal ToSqlDecimal() { 511return (SqlDecimal)this;
fx\src\data\System\Data\SQLTypes\SQLInt64.cs (7)
368public static explicit operator SqlInt64(SqlDecimal x) { 372SqlDecimal ssnumTemp = x; 384ulong dwl = SqlDecimal.DWL(ssnumTemp.m_data1, ssnumTemp.m_data2); 385if (dwl > SqlDecimal.x_llMax && (ssnumTemp.IsPositive || dwl != 1 + SqlDecimal.x_llMax)) 565public SqlDecimal ToSqlDecimal() { 566return (SqlDecimal)this;
fx\src\data\System\Data\SQLTypes\SQLMoney.cs (4)
106SqlDecimal snum = new SqlDecimal(value); 411public static explicit operator SqlMoney(SqlDecimal x) { 550public SqlDecimal ToSqlDecimal() { 551return (SqlDecimal)this;
fx\src\data\System\Data\SQLTypes\SQLSingle.cs (3)
264public static implicit operator SqlSingle(SqlDecimal x) { 418public SqlDecimal ToSqlDecimal() { 419return (SqlDecimal)this;
fx\src\data\System\Data\SQLTypes\SQLString.cs (3)
566public static explicit operator SqlString(SqlDecimal x) { 726public SqlDecimal ToSqlDecimal() { 727return (SqlDecimal)this;
fx\src\data\System\Data\xmlsaver.cs (1)
212if (type == typeof(Decimal)|| type == typeof(SqlDecimal) || type == typeof(SqlMoney))
System.Data.Entity (1)
System\Data\EntityClient\DbParameterHelper.cs (1)
223return ((System.Data.SqlTypes.SqlDecimal)(Decimal) value).Precision;