Ejemplo n.º 1
0
        public NonNullCollection <TreeNode <T> > GetDescendants()
        {
            NonNullCollection <TreeNode <T> > result
                = new NonNullCollection <TreeNode <T> >();

            foreach (TreeNode <T> child in Children)
            {
                result.Add(child);
                result.AddRange(child.GetDescendants());
            }

            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public TreeNode()
 {
     Children = new NonNullCollection <TreeNode <T> >();
 }