SqlDecimal MaxValue

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Has anyone noticed that the doc for this says:

The value of this constant is
79,228,162,514,162,514,264,337,593,543,950,335

but that it is actually

99,999,999,999,999,999,999,999,999,999,999,999,999?

Just thinking that Microsoft has a (minor) documentation error that
should be fixed.
 
That and the first line under SqlDecimal structure description is:

Represents a fixed precision and scale numeric value between -10^38 -1
and 10^38 -1...


But even that looks like an error. Shouldn't it be

....-10^38+1 and 10^38-1...

?

There can be up to 38 digits in an SqlDecimal; MaxValue returns

99,999,999,999,999,999,999,999,999,999,999,999,999

MinValue returns

-99,999,999,999,999,999,999,999,999,999,999,999,999

but -10^38-1 is

-100,000,000,000,000,000,000,000,000,000,000,000,001

-Chris
 
Back
Top