Monday, July 27, 2009

C# help plz?

wats the syntax to format the textBox value to currency

C# help plz?
float currency;


currency = Decimal.Round(atof(textBox.Text), 2);





there is no currency datatype in c#. You are simply converting it to a float and then rounding to 2 decimal places.


No comments:

Post a Comment