Dim tree As New DataTree(Of Object) Dim j,i As Integer For j = 0 To nPaths - 1 Dim path As New GH_Path(j) For i = j * (nStep + 1) To nStep * (j + 1) + j tree.Add(x(i), path) Next Next Dim List As New List (Of Object) List = tree.Branch(ItemPath) Dim num As Object
'Why does not work "For Each" for list?
For Each num In List If num > y Then B = 0 Else B = 1 Print(B) Next Trees = tree Lists = List