/// <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); }
/// <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)); }