Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
how would you navigate through the list of an arrayList, Hashtable compared with navigating through an array?
Posted

It really depends on what it is that you want to do but for plain old look at all the content either of For Next loop or For Each works as well as any other method.
 
Share this answer
 
Don't use ArrayList and HashTable. They are outdated. Use List and Dictionary instead:
VB.NET
Dim x As New List(Of String) From {"a", "b"}
Dim y As New Dictionary(Of String, Integer) From {{"C", 3}, {"D", 8}}
For Each item As String In x
	MessageBox.Show(item)
Next
For Each key As String In y.Keys
	MessageBox.Show(key + ", " + y(key).ToString())
Next

There are many ways to "navigate" those collection types, but that's one way.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900