Pass only 1-dimension of 2-dimensional array as 1-D array to arraylist.addrange

ridhwaans

Active member
Joined
Jun 1, 2012
Messages
34
Programming Experience
3-5
/title

2-dimensional array declared as Public strArray(0 To 7, 0 To 118) As String
arraylist declared as Dim strArrayList As New ArrayList

strArrayList.AddRange(strArray(5,())) and strArrayList.AddRange(strArray(5,)) dont work
 
A 2D array is a matrix. There is no object that represents a single "row" or "column". If you want a subset of the elements then you have to pick out that subset one by one. You would do that using a For loop.
 
Back
Top