/// <summary> /// Adds the child tree to this node. /// </summary> /// <param name="child">The child tree to add.</param> public void Add(GeneralTree <T> child) { if (child.parent != null) { child.parent.Remove(child); } if (!childNodes.Contains(child)) { childNodes.Add(child); child.parent = this; } }
/// <summary> /// Determines whether the Sorted List contains the specified item. /// </summary> /// <param name="item">The item.</param> /// <returns> /// <c>true</c> if the item is contained in the list; otherwise, <c>false</c>. /// </returns> public bool Contains(T item) { return(data.Contains(item)); }