Skip to content

Commit cd2dfe3

Browse files
decimal.Parse must specify the culture to read the right decimal number
1 parent dd4f61e commit cd2dfe3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dotnet/src/dotnetframework/GxClasses/Domain/GxCollections.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,7 @@ static decimal RemoveInternalTrailingZeroes(decimal dec)
16461646
if (GetDecimalScale(dec) > 0)
16471647
{
16481648
string strdec = dec.ToString(CultureInfo.InvariantCulture);
1649-
return decimal.Parse(strdec.Contains(".") ? strdec.TrimEnd('0').TrimEnd('.') : strdec);
1649+
return decimal.Parse(strdec.Contains(".") ? strdec.TrimEnd('0').TrimEnd('.') : strdec, CultureInfo.InvariantCulture);
16501650
}
16511651
else
16521652
return dec;
@@ -3205,4 +3205,4 @@ public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOp
32053205
}
32063206
}
32073207
#endif
3208-
}
3208+
}

0 commit comments

Comments
 (0)