I have a string read from a textbox. It contains a comma for decimal separation.
I have NumberFormatInfo.CurrencyDecimalSeparator
set to ,
(comma) but when I convert the string to decimal Convert.ToDecimal(mystring);
I obtain a dot separate value for decimal.
Example:
decimal a=Convert.ToDecimal("1,2345"); ----> decimal is 1.2345
I have tried also:
double a=Convert.ToDouble("1,2345");
but dot for decimal again
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…