Beispiel #1
0
 /// <summary>
 /// Removes the specified child node from the tree.
 /// </summary>
 /// <param name="child">The child tree to remove.</param>
 /// <returns>A value indicating whether the child was found (and removed) from this tree.</returns>
 public bool Remove(GeneralTree <T> child)
 {
     if (childNodes.Remove(child))
     {
         child.parent = null;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Removes the specified item.
 /// </summary>
 /// <param name="item">The item to remove.</param>
 /// <returns>
 /// true if item was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"></see>; otherwise, false. This method also returns false if item is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"></see>.
 /// </returns>
 /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"></see> is read-only.</exception>
 public bool Remove(T item)
 {
     return(data.Remove(item));
 }