private void AddChild(Node child, int index) { if (child == null) return; if (child.Parent != null) child.parent.children.ReleaseChild(Array.IndexOf(child.parent.children._childrenArray, child)); _childrenArray[index] = child; child.parent = _owner; }
public ChildrenCollection(Node owner, int length) { _owner = owner; _childrenArray = new Node[length]; }