Hi finito, I think the OP meant more something like this
Thanxx ddanbe, your codes are correct but i want to know where i use the nested classes in real word . I know how to write nested class , but i dont know where,what is the most suitable time to use, why nested class ,why it is important to use them, plz explain me
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...