Array Parameters - .NET Call Parameters
- Updated2026-02-03
- 2 minute(s) read
Array Parameters - .NET Call Parameters
Array Parameters
You can specify an array that contains elements of any type. For arrays, TestStand reformats the contents of the array into a temporary .NET array that contains elements that have the data type the assembly expects. For an array of structs, you can specify an array of object references, where each element is a reference to a .NET struct, or you can specify an array of TestStand data types where each element is an instance of a TestStand data type that corresponds to the .NET struct. In the latter case, the TestStand custom data type of the array must have struct passing enabled, and it must match the structure of the struct.
For inputs, the number of dimensions in the TestStand array must match the number of dimensions in the .NET array. For outputs, the TestStand array is resized, and new dimensions are specified to match the .NET array.
For one-dimensional arrays other than arrays of structs, you can specify an argument for each element of the array. To add elements to the bottom of the array, click the <+> sign at the root of the array. Click <+> on an array element to add a new element below the selected array element. Click <-> to delete the selected array element.
For one-dimensional arrays, TestStand always converts the arrays to zero-based indexes no matter what the lower-bound value is in TestStand because the .NET Framework supports only zero-based indexes for one-dimensional arrays. Ensure that any one-dimensional array you use with the .NET Adapter is zero-based or will be zero-based after the call.
For multi-dimensional arrays, the .NET Adapter preserves the lower-bound values because multi-dimensional arrays can have lower-bound values other than zero in .NET.
Jagged Array Parameters
The .NET Adapter supports storing and passing jagged arrays, also known as arrays of arrays, as parameters using TestStand object reference variables. The .NET Adapter does not support converting jagged arrays to or from a TestStand equivalent array.