Trailing Zeros in Decimal Class with Framewrok 1.1

  • Thread starter Thread starter Arul Johnson
  • Start date Start date
A

Arul Johnson

hi all,
Since I installed .Net Framework 1.1 all of my
numeric fields particularly decimals are showing six
decimal places for all numbers. But when under 1.0 no
decimal places showed if.
pls tell me what could be the problem & what is the
solutions. I can use Formatting options but i need to know
the exact reason for this isuue!!
 
Arul Johnson said:
Since I installed .Net Framework 1.1 all of my
numeric fields particularly decimals are showing six
decimal places for all numbers. But when under 1.0 no
decimal places showed if.
pls tell me what could be the problem & what is the
solutions. I can use Formatting options but i need to know
the exact reason for this isuue!!

See http://www.pobox.com/~skeet/csharp/decimal.html
and
http://www2.hursley.ibm.com/decimal/decifaq.html

Basically MS changed it from 1.0 to 1.1 because some uses of decimal
require the number of zeroes to be maintained.

I wrote and posted some code to normalise decimals a while ago. It's
far from optimised, but I believe it works. If you search
groups.google.com for:
normalize insignificant decimal author:[email protected]

you should find it.
 
Back
Top