예제 #1
0
        /// <summary>
        /// Detaches this node from it's parent.
        /// Postcondition: this is a root node.
        /// </summary>
        /// <returns></returns>
        public DTreeNode <T> Detach()
        {
            if (mParent != null)
            {
                Siblings.Remove(this);
            }

            return(this);
        }
예제 #2
0
        /// <summary>
        /// Detaches this node from it's parent.
        /// Postcondition: this is a root node.
        /// </summary>
        /// <returns></returns>
        public T Detach()
        {
            if (_parent != null)
            {
                Siblings.Remove((T)this);
            }

            return((T)this);
        }
예제 #3
0
파일: Person.cs 프로젝트: l5d1l5/ILUTE
 private void RemoveSibling(Person person)
 {
     Siblings.Remove(person);
 }