I am trying to get the index value of an array by using a for Each loop.
I am making an error in my code that I do not know how to correct.
I cannot loop through the ArrayList because it is not a number.
Dim num As Integer = 0
If Not IsNothing(BreadCrumbIDs) Then
For Each num In BreadCrumbIDs
If num >= 0 And num <= 1 Then
' Do nothing
Public Property BreadCrumbIDs() As ArrayList
Set(ByVal value As ArrayList)
bcIDs = value
Instead of looping the items in the list, loop the index.
For index As Integer = 0 To BreadCrumbIDs.Count-1
Then you can access the items with
If BreadCrumbIDs isn't a list of numbers, then I would suggest you change its name.
An other option could be to use the IndexOf method of the list.