Hi All,
when i use "{0:#,#.##}" format string for decimal values it seems like that;
12,1457 --> 12,15
45,4119 --> 45,41
but for one decimal digit values it does not show zero after first decimal
digit.
12,4000 --> 12,4
78,8000 --> 78,8
45,5000 --> 45,5
are there any format string to show zero after decimal digit like that;
12,4000 --> 12,40
78,8000 --> 78,80
45,5000 --> 45,50
Thanks ..
White..
Martin Honnen - 16 Mar 2008 13:35 GMT
> Hi All,
>
[quoted text clipped - 12 lines]
> 78,8000 --> 78,80
> 45,5000 --> 45,50
I think you want
"{0:#,##0.00}"

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jon Skeet [C# MVP] - 16 Mar 2008 16:27 GMT
> Hi All,
>
[quoted text clipped - 12 lines]
> 78,8000 --> 78,80
> 45,5000 --> 45,50
Use "{0:#,0.00}" - look at the docs for the difference between 0 and #
in a format string.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk