<p>I have a N-Ary non sorted in any way tree and each node can have 0-N children. Given the data structure below, how can I fill the tree view assuming you have an array of TermNodes and that array is the first level of the TreeView? I have not been able to come up with a recursive way to do this.</p>

<pre><code>class TermNode
{
   public string Name;
   public string Definition;
   public List&lt;TermNode&gt; Children
}
</code></pre>

Here is a bit of code to get you started with the recursion. It's not tested (I can't right now), but you should get the idea:
```
```
public static void BuildTreeView(TreeNodeCollection Parent, List<TermNode> TermNodeList)
{
  foreach (TermNode n in TermNodeList)
  {
    TreeNode CurrentNode = Parent.Add(n.Name);
    // no need to recurse on empty list
    if (n.List.Count > 0) BuildTreeView(CurrentNode.Nodes, n.List);
  }
}

// initial call
List<TermNode> AllTermNodes = /* all your nodes at root level */;

BuildTreeView(treeView1.Nodes, AllTermNodes);
```
```