Question How to convert string to double?

raysefo

Well-known member
Joined
Jul 21, 2010
Messages
207
Programming Experience
Beginner
hi,

I want to convert string to double.

Dim str As String = "1.5432"
Dim num As Double = Convert.ToDouble(str)

num should be 1.5432 but i get 15432

How can i get as it is in the string?
thanks in advance.

Best Regards
 
your region settings must be Europian or somewhere that uses the "," instead of "." as the fractional delimiter.

You can of course pass region settings to the parse method to define a special case region.
 
Back
Top