how to get the range from the arraylist
Hi...
I am creating a arraylist..
[apple, 02, car, orange, 03, bike, grape, 04, train]
i wan to do a for..loop to get every 3 range of the object on the arraylist,
example it will get (apple, 02, car) then(orange, 03, bike) then (grape, 04, train).
I am doing the application for pocket pc..
So, from the msdn website, i got to knw that i can use arraylist.getrange(index,count) but in my codes when i tried it states that getrange is not a member of arraylist.
So, anyone can help, if there is any other way that i can do to get it working... :)
thanxs 4 helping...
Re: how to get the range from the arraylist
this may help point you towards what you want
VB Code:
Dim newrange As String = ""
Dim l_ctr As Integer = 0
Dim l_e As IEnumerator = l_myarraylist.GetEnumerator()
l_e.reset()
While l_e.MoveNext
If l_ctr > 3 Then
'add code to do whatever is needed with the 3 elements
l_ctr = 0
End If
newrange &= Ctype(l_e.current,String) & ","
l_ctr = l_ctr + 1
End While
Re: how to get the range from the arraylist
ya..thanxs...ur codes helped me..... :)