Forum Discussion
- Philip_BairdCommunity ExpertHi Guruprasad, as C# Script is based on JScript, Arrays are inherently dynamic and you can use the Array::push() method to dynamically increase the Array size as follows:
function test001() {
var x = []; // Declare empty Array
x.push( "abc" ); // Push new item, Array will "dynamically" grow
Log["Message"]( x[ 0 ] ); // Logs abc
}
Hope this helps, regards,
Phil Baird - Philip_BairdCommunity ExpertHi Guruprasad, if you are writing C# Script for it's intended pupose of exporting the code to C# Self-Testing and/or Connected Applications you will probably want to disregard my previous post as JScript Arrays are not supported.
Apologies for any inconvinience