S
Scott McNair
Hi,
I'm trying to populate a 2-dimensional array by assigning each item its own
instance of a class, for example:
Dim SubSector(8,10) As New SystemClass
....where SystemClass is a class I've defined elsewhere in my code.
However, it won't let me use "New" in the declaration (it gives the error
"Arrays cannot be declared with 'New'") and if I leave "New" out, then each
section of the array contains the exact same data - it's as though instead
of having its own instance of SystemClass, each section is referring to the
original class.
How would I go about making each instance unique unto itself, rather than
all clones of each other?
I'm trying to populate a 2-dimensional array by assigning each item its own
instance of a class, for example:
Dim SubSector(8,10) As New SystemClass
....where SystemClass is a class I've defined elsewhere in my code.
However, it won't let me use "New" in the declaration (it gives the error
"Arrays cannot be declared with 'New'") and if I leave "New" out, then each
section of the array contains the exact same data - it's as though instead
of having its own instance of SystemClass, each section is referring to the
original class.
How would I go about making each instance unique unto itself, rather than
all clones of each other?