ID

Uploaded

Status

Description

Work Items

Action

6253
by MagnusJ
Jul 4, 2010
11:58 AM

Being evaluated

This patch fixes a Conversion bug when running on an OS with non-English regional settings. The issue is that some culture infos have a decimal separator with a comma instead of a dot. A to-decimal conversion using the default decimal.TryParse() method will silently fail on these system. My patch suggests to use the CultureInfo.InvariantCulture paramete liks this:

decimal.TryParse(toConvert, NumberStyles.Any, CultureInfo.InvariantCulture, out tempValue)

This is used in the ToDecimalOrNull() method in the Conversion.cs class.

I have attached the Conversion.cs file I modified accordingly.

Regards,
Magnus

6596

Download

View All
  • 1-1 of 1 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches