Answers for "visualbasic array with dynamic objects"

0

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
Posted by: Guest on September-25-2020

Code answers related to "visualbasic array with dynamic objects"

Code answers related to "BASIC"

Browse Popular Code Answers by Language