/// <summary> /// delete subtree starting with this node /// </summary> /// <returns> returns next sibling</returns> internal NodeBase deleteSubTree() { while (FirstChild != null) { FirstChild.deleteSiblingsWithSubtree(); } NodeBase next = NextSibling; delete(); return(next); }