|
-
Sep 20th, 2005, 11:42 PM
#1
Thread Starter
Member
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...
-
Sep 21st, 2005, 03:18 AM
#2
Fanatic Member
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
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Sep 21st, 2005, 04:18 AM
#3
Thread Starter
Member
Re: how to get the range from the arraylist
ya..thanxs...ur codes helped me.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|