Decimal precision - C#
All,
For a decimal value of 1 billion being retrieved from SQL Server where the associated datatype is Numeric (28,10), I am running into Conversion overflow exception. From MSDN:
The .NET Framework decimal data type allows a maximum of 28 significant digits
I need to clarify if the digits here refer t开发者_开发百科o the binary form or decimal form itself?
In SQL Server for Numeric and Decimal datatypes this defines a maximum of 28 decimal digits (the precision) with a maximum of 10 decimal places to the right of the decimal point (the scale).
The limitation is imposed by the decimal representation and the 28 significant digits refer to 28 decimal digits.
Its Decimal digits that it will accept max of 28 digits.
精彩评论