Question double to string without the change of decimal point to comma

Rayk411

Member
Joined
Feb 20, 2012
Messages
5
Programming Experience
1-3
Hi,

I'm having some trouble converting a double to a string.
I have a double value, like 43.64 and I need a string like this: "43.64"

If I try to convert the double to a string I always get "43,64" what doesn't work for me..

I tryed CStr(), convert.toString, CType(), ... they all give me the same thing with a comma.

Can somebody help me out?

thx
 
Last edited:
The string format you get is the culture format your computer is set to. If you want a different culture format you can pass an instance of CultureInfo as argument to ToString method (IFormatProvider parameter).
Why do you need a number in string format different than how the computer is configured?
 
Sometimes it's simply easier for standardization. Also if you use an Access database, MS DAO doesn't work well with the comma as a decimal separator. In some occurences it can cause corruption.
 
Why do you need a number in string format different than how the computer is configured?

I need to make a calculation with the datatable.compute method, which uses a string expression, the string that is entered in the expression needs to be with a decimal point instead of a comma
 
Back
Top