public void AddChild(MyNode child) { Children.Add(child); child.Parent = this; }
public void RemoveChild(MyNode child) { Children.Remove(child); child.Parent = null; child.Dispose(); }
public bool CheckForCycle(MyNode to) { var visited = new HashSet <MyNode> (); return(CheckForCycle(this, to, visited)); }