Foreach branch in a tree

How to do foreach in every branch in a tree?

Must it be a foreach? You could create a regular for loop over the path count of the tree, then access the branches or paths by this index.

for (int p = 0; p < iLines.PathCount; p++)

i See! but then when Access the branches should I use {} or ?

How can i than go through every item in one branc like a normal list? what to have where the ??? are in the Picture??

In C# the curly braces are only for scope. They are a language feature which cannot be used by any specific api. The square brackets are called indexers and they are used to access items in collections.

I’m on an iPad now without access to Rhino, Grasshopper or a C# editor, so I can’t answer this with proper code until tomorrow.