I need to convert a decimal to a string with N decimals (two or four) and NO thousand separator:
\'XXXXXXX (dot) DDDDD\'
The problem with CultureInfo.I
CultureInfo.I
I think you could have used: value.ToString("F"+NumberOfDecimals)
value.ToString("F"+NumberOfDecimals)
value = 10,502 value.ToString("F2") //10,50 value = 10,5 value.ToString("F2") //10,50
Here is a detailed description of Numeric Format Strings