Displaying currency

  • Thread starter Thread starter Hechmi
  • Start date Start date
H

Hechmi

Hello everybody,
I have a variable of type float that i want to display it in text box as a
currency, does any one has an idea of how to do it?

example:

float a= 10.0;
i want to display
10.00


thank you very much.
 
Hechmi said:
Hello everybody,
I have a variable of type float that i want to display it in text box as a
currency, does any one has an idea of how to do it?

example:

float a= 10.0;
i want to display
10.00

Look up "standard numeric format strings" in MSDN. The "c" format gives
the currency symbol as well; you may well just want f2 instead.
 
Back
Top