コード例 #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);
 }