[Mono-devel-list] problems wih decimal on cygwin
Konstantin Triger
kostat at mainsoft.com
Wed Jul 6 02:58:42 EDT 2005
Hello,
I run the following code on cygwin:
decimal d1 = 0;
decimal d = d1 / 10000000000000000000000000000M;
Console.WriteLine( d > 0 );
decimal d2 = 1;
decimal d3 = d2 + d;
Console.WriteLine( d3 );
and the output it produces is:
True
Unhandled Exception: System.OverflowException: Overflow on adding
decimal number
in <0x00063> System.Decimal:Add (Decimal d1, Decimal d2)
in <0x0004a> System.Decimal:op_Addition (Decimal d1, Decimal d2)
in <0x001e8> Class1:Main (System.String[] args)
Has anyone run into this situation?
--
Regards,
Konstantin Triger
More information about the Mono-devel-list
mailing list