Ejemplo n.º 1
0
        /// <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;
            }
        }
Ejemplo n.º 2
0
 /// <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));
 }