Trailing Zeros in Decimal Class with Framewrok 1.1

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!!
 
J

Jon Skeet [C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top