In C# when you declare an array , you have to specify the size; In the above code you have to initialize your array to some size .
string[] str = new string[10];
When you init an array with size zero ,it will create an empty array object .
Here I am initializing the array to be of size 10 .And in the for loop , may be you can check for the array length and based on the check you can declare a new array of the desired size and copy the contents of the original array into the new array.
Again there are build in methods like Array.Resize .
Array.Resize(T) Method (T[], Int32) (System)[
^]