Re: FOR EACH ... bug/problem/quirk ....
1) I thought that, in most cases, if you remove an item during a For Each, you got all sorts of strange results generally? I've had a number of programs crash when doing this kind of thing
2) A quick work around is to do this, but it doesn't really answer you question:
Code:
For Each Childnode As TreeNode In TreeView1.Nodes
Do While Childnode.Nodes.Count = 0
Childnode = Childnode.NextNode
Childnode.PrevNode.Remove()
Loop
Next
Help from me is always guaranteed!*
VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.
*Guarantee may not be honoured.