Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate 3 EZ Pay
Message
 
À
23/10/2008 10:33:33
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01356419
Message ID:
01356597
Vues:
34
Hi Bruce,

Yes, this is what I ended up using:
Dim nConstant As Decimal
Dim nInput As Double
Dim nNewValue As Double

nInput = Convert.ToDouble(txbAMSEZPay.Text)
nConstant = 3

nNewValue = ((Math.Floor(100 * (nInput / nConstant))) / 100) * nConstant
All of the below are rounding up:

iNumber = Convert.ToInt32(nDouble)
iNumber = nDouble \ 1
iNumber = nDouble
iNumber = CType(nDouble, Integer)
iNumber = Math.Round(nDouble, 0)
iNumber = Math.Ceiling(nDouble, 0)

Thank you,
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform