[Mono-devel-list] patch: System.Decimal ctor should be locale-independent

Rodolfo Campero rodolfocampero at hotmail.com
Sat Jun 19 07:43:05 EDT 2004

Hello everybody,

Here goes a small patch to System.Decimal. The patch fixes a dependency
on the local culture when creating a Decimal from either a Double or a

You can expose the bug by trying to compile the following program:

public class TestDecimalCulture {
  public static void Main (string[] args) {
    System.Decimal d = (decimal)1.1;

  LANG=es mcs TestDecimalCulture.cs

(if you change the language to 'en' it works)

I'm not subscribed to mono-devel-list, so if there's something wrong
with this patch please CC my email address.

With kind regards,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: System.Decimal.patch
Type: text/x-patch
Size: 1187 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040619/62e7898c/attachment.bin 

More information about the Mono-devel-list mailing list