From the following two - double precision - numbers:
123456
0.0003232
I need to get (at least one decimal place) ...
123456.0 (one decimal place added)
0.0003232 (same as above)
... and never scientific notation, like E+000. The more close result from standard string.Format()
is string.Format("{0:F1}", myDoubleVal)
but in the second case the decimals are lost.
What else can I try?
Thanks.
Try the below
string.Format("{0:0.0###########}",myval);
Thanks
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