Hi,
For the purposes of serializing some real data to XML I'm using .Net libraries to format real to double and then to string. Here's a simple code:
static void Job42(Args _args)
{
real QtyFactor = 0.5;
System.Double netDouble;
str val;
netDouble = Global::real2double(QtyFactor);
if (QtyFactor > 0.0 && QtyFactor < 1.0) breakpoint;
val = netDouble.ToString("F", new System.Globalization.CultureInfo(""));
info(val);
}
The code compiles just fine. However when execution goes over the line with ToString() call the entire AX client bugs out with crash. Restarting AOS does not help.
Should I change the code as follows everything works and prints "0,5":
static void Job42(Args _args)
{
real QtyFactor = 0.5;
System.Double netDouble;
str val;
netDouble = Global::real2double(QtyFactor);
if (QtyFactor > 0.0 && QtyFactor < 1.0) breakpoint;
val = netDouble.ToString();
info(val);
}
Any ideas?
*This post is locked for comments
I have the same question (0)