SIGN UP MEMBER LOGIN:    
Blog

Populating an Array of Arrays

Posted by Dinesh Beniwal Blogs | Visual Basic Language Aug 04, 2010
In this blog you will learn how to Populating an Array of Arrays.
HTML clipboard

Module Module1

 

    Sub Main()

        Dim IntArray(9) As Integer

        Dim StrArray(99) As String

        Dim Bigarray(1) As Object

        Dim i As Integer

        'populate array intArray

        For i = 0 To 9

            IntArray(i) = i

        Next

        'populate array StrArray

        For i = 0 To 99

            StrArray(i) = "ITEM" & i.ToString("0000")

        Next

        Bigarray(0) = IntArray

        Bigarray(1) = StrArray

        Console.WriteLine(Bigarray(0)(7))

        Console.WriteLine(Bigarray(1)(16)) 
 
    End Sub
 
End Module

share this blog :
post comment