title: Collection was modified; enumeration operation may not execute. Treenode Remove
body: <p>It seems for removing a TreeNode i have to traverse to it's parent hence i did below just to find the original collection was modified even though it was a instance. Below is the code and <code>tvRightTree</code> is the TreeView of interest</p>
  
  <pre><code>TreeNodeCollection checkedNodeCollection = tvRightTree.CheckedNodes;
  foreach (TreeNode checkedNode in checkedNodeCollection) {
    //if the to be removed node is parent then remove through treeview
    if (checkedNode.Parent != null) {
      //compiler does not allow modifying a collection that we iterate
      //hence resort to finding the parent and then remove
      TreeNode targetParent = tvRightTree.FindNode(checkedNode.Parent.ValuePath);
      targetParent.ChildNodes.Remove(checkedNode);
    } else
      tvRightTree.Nodes.Remove(checkedNode);
    }
  </code></pre>
  
  <p>What is the correct way to remove checked TreeNodes from the treeview?</p>