How to create 2 dimensional dynamic array (vb.net or c#)

  • Thread starter Thread starter singleb
  • Start date Start date
S

singleb

I've tryed to something lik this and got "Object reference not set to
an instance of an object."

Dim myarr(,) As String
myarr(0, 0) = "aaaa"
myarr(0, 1) = "bbbb"
myarr(1, 0) = "cccc"
myarr(1, 1) = "dddd"


Thanks.
 
Try:

Dim myArr(,) As String

ReDim myArr (1, 1)








- Show quoted text -

The problem I dont know how long will be this array, I cant define its
size.
I guess it cant be done with arrays, is there some control or type
that will do this job ?
 
Back
Top