Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A For Each loop uses an array as its iteration variable but initializes that array.
Error ID: BC32039
Example
The following example generates bc32039:
Dim arrayList As New List(Of Integer())
For Each listElement(1) As Integer In arrayList
Next
To correct this error
Remove the initialization from the declaration of the iteration variable as shown in the following example:
Dim arrayList As New List(Of Integer())
For Each listElement() As Integer In arrayList
Next
or you can use type inference:
Dim arrayList As New List(Of Integer())
For Each listElement In arrayList
Next
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.