Example #1
0
 public void traverse(NTree <T> node, TreeVisitor <T> visitor)
 {
     visitor(node.data);
     foreach (NTree <T> child in node.children)
     {
         traverse(child, visitor);
     }
 }
Example #2
0
 public void addChild(NTree <T> node)
 {
     children.AddFirst(node);
 }