System.FormatException while parsing a string containing valid integer values

Trying to convert a value to an integer using the Parse function might throw a "System.FormatException" with the following following call stack.

Unhandled Exception: System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int16.Parse(String s, NumberStyles style, NumberFormatInfo info)
   [...] ( application specific callstack)

This could arise from a call to one of the Convert.ToIntxx functions ( viz.,ToInt16, ToInt32, ToInt64) or the Intxx.Parse()( Int16.Parse, Int32.Parse or Int64.parse) . The exception is not thrown for any value other than 0.

This is due to corruption of a registry key's value that deals with globalization settings.

The registry key "sPositiveSign" under HKEY_CURRENT_USER\Control Panel\International should be blank for this to work correctly. If this is set to 0 the above exception will occur. Change this value to " " in the registry key to correct this exception.

Note that whenever the value that is parsed is the same as the value for the 'sPositiveSign' item this exception is thrown.