I need to display float as
1.00
1.50
1.55
1.60
The following is what I see using f2 format.
1.
1.5
1.55
1.6
Is there a way to force the trailing 0 to appear?
(I'm using a DevExpress SpinEdit control and trying to set the display and edit format.)
yourNumber.ToString("N2");
You can use syntax like this:
String.Format("{0:0.00}", n)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With