V
VB_Noob
The following code generates a latebound exception.
Anyone have any idea why & how to fix it?
-----------------------------------------------------
Public Class Form1
Structure sTest
Dim ItemA As String
Dim ItemB As String
End Structure
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim aTest As New ArrayList
aTest.Add(New sTest)
aTest(0).ItemA = "test" '<-- LateBound Exception
End Sub
End Class
Anyone have any idea why & how to fix it?
-----------------------------------------------------
Public Class Form1
Structure sTest
Dim ItemA As String
Dim ItemB As String
End Structure
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim aTest As New ArrayList
aTest.Add(New sTest)
aTest(0).ItemA = "test" '<-- LateBound Exception
End Sub
End Class