c# decimal.toString()
conversion problem
Example: I have a value in decimal(.1) when I convert decimal to string using toString() it return
Then your current culture's NumberDecimalSeparator is ,
instead of .
.
If that's not desired you can force the dot with CultureInfo.InvariantCulture
:
decimal num = 0.1m;
string numWithDotAsSeparator = num.ToString(CultureInfo.InvariantCulture);
or NumberFormatInfo.InvariantInfo
string numWithDotAsSeparator = num.ToString(NumberFormatInfo.InvariantInfo)