How to convert a string to double with decimals

How can i convert a string thats 1650,00 to a double ? so it will include the decimals

I have alrdy tried conver.todouble and parse method but both gives me 165000 instead of 1650,00

@langsem - provided number #1650,00 - , should be a decimal point? if yes replace , with .

Already found a solution :slight_smile: but thanks
My solution was convert.todouble(var, culture)

then culture its a Cultureinfo = new CultureInfo(β€œfr”)

2 Likes

Hi,

Can you try the following?

Double.Parse(yourString, System.Globalization.NumberStyles.Any, new System.Globalization.CultureInfo("fr-FR"))

Regards,

1 Like

Hi @Yoichi ,

I am having the same issue, and I used what you said, but I am getting a β€œ.” as decimal, and I put my culture info (β€œes-ES”).

How can I get the β€œ,” as decimal?

Thanks:)