Is Int32.ToString() culture-specific?

The Operating System allows to change the negative sign for numbers.

Control panel -> 
   Language and regional settings -> 
         Additional settings -> 
             Negative sign

So, current culture could have overridden the negative sign. In this case you need to respect the regional settings, this is the reason of the warning. You can also change the negative sign programatically:

    CultureInfo culture = Thread.CurrentThread.CurrentCulture;
    // Make a writable clone
    culture = (CultureInfo) culture.Clone();
    culture.NumberFormat.NegativeSign = "!";

Leave a Comment