In TestStand 3.5 we invoked methods in .Net assemblies through .Net Action steps that return an array of doubles. When we upgraded to TestStand 4.0 the arrays returned by these steps contain zeros rather than the values we expect. I have reduced this problem to the simplest example I can and I see the same results.
My .Net 2.0 assembly C# source code is as follows:
%<------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
namespace ArrayPassingTest
{
public class Class1
{
public double [] GetArray()
{
double[] doubleArray = new double[2] { 1.0, 2.0 };
return doubleArray;
}
}
}
%<------------------------------------------------
I wrote a two-line sequence that invokes this method and displays the returned values in a Message Popup step. When I run under TestStand 3.5, the values 1.0 and 2.0 are displayed. When I switch to TestStand 4.0 and run the same sequence, the values displayed are 0.0 and 0.0. I have tried modifying the Pass By Reference Flags of the TestStand variables that I am using without effect. Any suggestions as to what is happening?