When declaring an array ion C# you must specify a size. This determines the number of elements in the array.
Each element is initialised with the default value of the element type - hence if you create an array of type
double with 10 elements then all elements are set to 0.
Arrays cannot be re-sized in C#, you need to create a new array & copy your elements to the new array.
The typical method of working around this is to use something that can be dynamically sized and then copying to an array if required for instance;
List<double> myList = new List<double>();
for(double i = 0D; i < 10D; i++)
{
myList.Add(i);
}
double[] myArray = myList.ToArray();
Kind Regards