Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning decimal values to .NET
Message
From
02/10/2004 10:09:20
 
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00948193
Message ID:
00948203
Views:
18
>Did you step through your code with the debugger to see if the result was really 2? It might have been 1.8, and WriteLine *might* be rounding it without any additional formatting. (I don't use writeline for anything, just a guess). Just a hunch...

Sorry Kevin ; I encountered this behaviour inside a unit test, the writeline example was just for showing it here.
For more clarity I now added :
if (result==2M) Console.Out.WriteLine("Result is 2");
if (result==1.8M) Console.Out.WriteLine("Result is 1.8");
Result is 2.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform