How can I create an empty one-dimensional string array?
Something like:
Dim myArray(9) as String
Would give you an array of 10 String references (each pointing to Nothing).
If you're not sure of the size at declaration time, you can declare a String array like this:
Dim myArray() as String
And then you can point it at a properly-sized array of Strings later:
ReDim myArray(9) as String
ZombieSheep is right about using a List if you don't know the total size and you need to dynamically populate it. In VB.NET that would be:
Dim myList as New List(Of String)
myList.Add("foo")
myList.Add("bar")
And then to get an array from that List:
myList.ToArray()
@Mark
Thanks for the correction.