I can't figure out how to do the following :
I want to import some data from a file, including numeric values. The user can personalize separators, which are char
. For exemple, a number may look like this : 2 524,2
. Here, we have a "thousands" separator () and a "decimal" separator (
,
).
I try to convert these strings as double.
I know that I may do something like this :
double.Parse(str.Replace(tSep, '\0').Replace(dSep, '.'));
But I'm looking for a potential way of doing it more properly.
Thank you in advance.