visualbasic array with dynamic objects
// N250920
Class ClassA
Public data As String
Public Sub New(ByRef value As String)
data = value
End Sub
End Class
Module Module1
Sub Main()
Dim oClassA As ClassA()
ReDim oClassA(2)
oClassA(0) = New ClassA("a")
oClassA(1) = New ClassA("b")
Console.WriteLine(oClassA(0).data)
Console.WriteLine(oClassA(1).data)
Console.ReadLine()
End Sub
End Module