converting double to string

  • Thread starter Thread starter masoud bayan
  • Start date Start date
M

masoud bayan

I have some values in type of double such 0.00009 , 0.0000007, when I want
to show them in a text box and convert them to string they are changed to
scientific notation while I want to show them as they are.
I tried to use tostring("f") but it needs to have a precision number after
*f* which will cause always have fix number of characters (for example if
use f10 then 0.09 is converted to 0.09000000 while I need to show it as
0.09).
do you any suggestion of how I can convert such a numbers to string and show
them as they are not as scientific notation?

Thanks for any feedback
 
See the Help topic "Standard Numeric Format Strings", which lists all
of the format specifiers you can use to get your numbers to display
the way you want them to.

--Mary
 
Thanks for your reply.
I have seen that before but could not find any answer for this question.

Masoud
 
I have some values in type of double such 0.00009 , 0.0000007, when I want
to show them in a text box and convert them to string they are changed to
scientific notation while I want to show them as they are.
I tried to use tostring("f") but it needs to have a precision number
after
*f* which will cause always have fix number of characters (for example if
use f10 then 0.09 is converted to 0.09000000 while I need to show it as
0.09).
do you any suggestion of how I can convert such a numbers to string and
show
them as they are not as scientific notation?


ToString("0.########")
 
Thanks Josip,
Your reply is exactly what I need!
It is much more helpful than the suggestion >> *See the Help topic "Standard
Numeric Format Strings", *

Masoud
 
Back
Top