Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ToString format with decimals
Message
De
08/02/2012 21:40:10
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
ToString format with decimals
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01534947
Message ID:
01534947
Vues:
77
I am trying to understand a weird behavior with the use of ToString with decimals.

I have this code:
                            MessageBox.Show(loRow("Total"))
                            MessageBox.Show(loRow("Total").ToString("0.00"))
loRow("Total")=36.04

So, the first message box shows 36.04. The second one shows 3. I am using this approach at several places. This is the only place where it cuts off most of it. Even with a value of 500.00, this ends up with 5.

Anyone would know why?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform