Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert string to decimal
Message
 
À
10/04/2007 14:23:57
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01214079
Message ID:
01214089
Vues:
9
To convert (VB version is not too different):
decimal myValue = decimal.Parse(nAmount);
To Display (There is a multitude of ways to do this.):
Building on the above.
this.Sometextbox.Text = myValue.ToString("#,##.00");
HTH
Richard


>Hello UT,
>
>I have a string and I would like to convert it to decimal with 2 decimal places :
>Is there a class to do this?.
>
>
>string nAmount = "400";
>
>
>I would like to convert it to decimal: 4.00
>
>Thanks,
>Sergio
State of Florida, DCF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform