sandbagger
03-16-2009, 07:54 PM
i want to initialize a 2d array. i know i can do it like below but that way is clunky.
Dim a(2,2)
a(1,1) = "dog"
a(1,2) = "cat"
a(2,1) = "tiger"
a(2,2) = "lion"
the syntax below is incorrect but is there a way to do something like this in a single line of code? i have to initialize an array of size ~2x50.
Dim a = Array(("dog", "cat"), ("tiger", "lion"))
Dim a(2,2)
a(1,1) = "dog"
a(1,2) = "cat"
a(2,1) = "tiger"
a(2,2) = "lion"
the syntax below is incorrect but is there a way to do something like this in a single line of code? i have to initialize an array of size ~2x50.
Dim a = Array(("dog", "cat"), ("tiger", "lion"))