If I remove controls from a panel using
For Each ctl as control in Panel.Controls
then after removing the control I can ctl = Nothing or ctl.dispose (I can never recall if there is a difference).
But the For Each approach has the problem which has been covered here so often.
If I use another technique, e.g. Controls.Clear or a For i as Integer = 0 to Controls.Count - 1
then how can I dispose the control or set it to Nothing. (Which maybe doesn't matter but I'm trying to be a very good citizen.) I assume that I should not dispose the controls or set them to Nothing before removing them. Right?
View Complete Post