Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Blank if zero decimal format string
Message
De
24/09/2008 14:38:02
 
 
À
30/08/2008 15:51:48
Information générale
Forum:
ASP.NET
Catégorie:
Common Language Runtime
Divers
Thread ID:
01343549
Message ID:
01350286
Vues:
21
Thank you.
This shows always 2 places after decimal point.
How to force format to show as many decimal places as decimal value actually contains ?

>For example
> Console.WriteLine((123.4m).ToString("0.00;-0.00; ")); //123.40
> Console.WriteLine((-123.4m).ToString("0.00;-0.00; ")); //-123.40
> Console.WriteLine((0m).ToString("0.00;-0.00; ")); //
>
>Notice a space at the end of format string
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform