ArrayList Single Dimension Question ...?

Discussion in 'Programming' started by JEP_Dude, Mar 7, 2011.

  1. #1
    Hey Experts...!

    This VB.Net Learner has an ArrayList single dimension question. Would it be possible to declare an ArrayList within an array of objects? Please consider this example code:

    Public Class A
    Dim SharePrice As New ArrayList(10)

    Private B()
    For Index As integer = 1 to 10
    Me.SharePrice(Index).Add(CP)
    Next Index
    End Sub
    End Class

    But what about accessing this ArrayList from within Sub Main()? Should this work?
    ObjectName(ElementNumber).ArrayListName(ElementNumber).Item(DataNumber)

    If I had an array of "Stock" objects of class A, would that immediate above theory work if it were used like this:
    Stock(1).SharePrice(1).Item(1)

    Thanks in advance!

    ...God Bless.

    JEP_Dude
     
    JEP_Dude, Mar 7, 2011 IP