I have an ArrayList containing all selected TreeNodes in my TreeView. Now I want to delete them. How? I thought just using
For Each DummyNode In alNodes
Me.treDokumente.Nodes.Remove(DummyNode)
Next
would do it, but it doesn't. The first node is removed and then the error is something like "collection was modified; enumeration operation may not execute". Even after a alNodes.Reverse before doing it, the same error occured. Any suggestions?!
For Each DummyNode In alNodes
Me.treDokumente.Nodes.Remove(DummyNode)
Next
would do it, but it doesn't. The first node is removed and then the error is something like "collection was modified; enumeration operation may not execute". Even after a alNodes.Reverse before doing it, the same error occured. Any suggestions?!