R
Roshawn
Hi,
I have a small function that uses a For...Next loop. I am trying to place
the results of the loop in a string array. My code is as follows:
Dim i as Integer
Dim str() as String
For i = 0 to products.Items(0).Item.Length - 1
str() = New String() {products.Items(0).Item(i).Name}
Next
What I'm trying to do with the loop is this:
Dim str() as String = New String() {products.Items(0).Item(0).Name,
products.Items(0).Item(1).Name, etc.}
For some reason I cannot get the For...Next loop to work correctly. What am
I doing wrong? Any help will be appreciated.
Thanks,
Roshawn
I have a small function that uses a For...Next loop. I am trying to place
the results of the loop in a string array. My code is as follows:
Dim i as Integer
Dim str() as String
For i = 0 to products.Items(0).Item.Length - 1
str() = New String() {products.Items(0).Item(i).Name}
Next
What I'm trying to do with the loop is this:
Dim str() as String = New String() {products.Items(0).Item(0).Name,
products.Items(0).Item(1).Name, etc.}
For some reason I cannot get the For...Next loop to work correctly. What am
I doing wrong? Any help will be appreciated.
Thanks,
Roshawn