Are there any cultures where num.ToString("D")
will use something other than the regular minus sign ("\u002D") for negative numbers?
Documentation for Decimal format specifier (D) states the formatted string is affected by the current NumberFormatInfo object. Specifically by the NumberFormatInfo.NegativeSign property
.
Documentation for NumberFormatInfo.NegativeSign states
The string that denotes that the associated number is negative. The default for InvariantInfo is "-".
but does not give any examples of what this value may be in any cultures other than InvarianCulture.
I need to always have the regular minus sign ("\u002D") for negative numbers, regardless of the current culture. An obvious way to achieve this is to use num.ToString("D", CultureInfo.InvariantCulture)
.
Unfortunately we already have code in production that uses num.ToString("D")
, so I am trying to find out whether it may produce something other than the regular minus sign in some culture.