Is this a bug or just bad programming? I've never encountered this problem
before.
(Bare minimum sample form to illustrate.) I've also tried this with a
class. Same result.
The error is: For loop control variable 'd' already in use by an enclosing
For loop.
-----------------------------------------
Structure docdefs
Public c As Collection
Public d As Integer
End Structure
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim a As docdefs
Dim b As docdefs
For Each a.d In a.c
For Each b.d In b.c
' some code here
Next
Next
End Sub
before.
(Bare minimum sample form to illustrate.) I've also tried this with a
class. Same result.
The error is: For loop control variable 'd' already in use by an enclosing
For loop.
-----------------------------------------
Structure docdefs
Public c As Collection
Public d As Integer
End Structure
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim a As docdefs
Dim b As docdefs
For Each a.d In a.c
For Each b.d In b.c
' some code here
Next
Next
End Sub
Comment