Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning decimal values to .NET
Message
De
02/10/2004 10:09:20
 
 
À
02/10/2004 09:56:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00948193
Message ID:
00948203
Vues:
19
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform