How to split a tree by the first index in C#

Hi all,

could anybody give an example of how to split a tree by the first index in C#? Would be really appreciated

Like this:

Many thanks!

No really familiar with C# in GH but I’m guessing this is a pattern that could work.

I just wanted to piggy-back on my own question:
Can anyone tell me how to get the output from generic list to actual contents GH can understand?

@Will_Wang, If you want to append a list of data items to the specified branch in the tree, you’d better use AddRange instead of Add. (18.8 KB)


If you prefer to use Add, you have to manually iterate over all the items in the specified branch. (18.9 KB)

Thanks @Mahdiyar