Short and sweet version:
On one machine out of around a hundred test machines decimal.TryParse() is converting \"1.01\" to 0.01
Okay, this is going to soun
I am able to reproduce your results. Consider:
public NumberFormatInfo OneIsPositiveSignFormat()
{
NumberFormatInfo custom = new NumberFormatInfo();
custom.PositiveSign = "1";
return custom;
}
And then:
if (decimal.TryParse(value, NumberStyles.Number, OneIsPositiveSignFormat(), out val))
The thing is: Regional Settings does not show you the current positive sign, and mainly: you did not set the culture when parsing the number.
The value may come from various locations: It may have come from the registry as the system defaults, or the defaults could have been set by code:
CultureInfo customCulture = (CultureInfo)CultureInfo.InvariantCulture.Clone();
customCulture.NumberFormat = OneIsPositiveSignFormat();
Thread.CurrentThread.CurrentCulture = customCulture;