Ejemplo n.º 1
0
 /// <summary>
 /// Adds a new child node.
 /// </summary>
 /// <param name="child">The child tree to add.</param>
 /// <returns>The complete tree.</returns>
 public SortedTree <T> Add(SortedTree <T> child)
 {
     _children.Add(child);
     child.Parent = this;
     return(child);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a new child node.
        /// </summary>
        /// <param name="child">The child data.</param>
        /// <returns>The new child as tree.</returns>
        public SortedTree <T> Add(T child)
        {
            var node = new SortedTree <T>(child);

            return(Add(node));
        }