so I am using a code like this:
Double.TryParse(Value, NumberStyles.Any, CultureInfo.InvariantCulture, out result);
and for now the language is on French but some clients may use other languages too, so I am not gonna hard code “fr-FR” in the program…but now if I pass “2,00” which should be number two, it is converting it to number two hundred.
any help on how can I do this correctly?
thanks
You can get the current culture for the system using
CultureInfo.CurrentCulture. Use this instead ofInvariantCulture.