How to Create Dynamic Multi-Dimensional Arrays

  • Thread starter Thread starter deskcheck1
  • Start date Start date
D

deskcheck1

Guest
Hi,

How do I declare a multi-dimensional array whose size is unknown at the start of the application? For example, depending on the state and county in the US, I need to declare a multi-dimensional array where each member is also an array consisting of 3 fields.

Sample data:
state = Delaware
number of counties = 3
array should be:
arr = [{"Kent", "Delaware", "10001"}, {"New Castle", "Delaware", "10003"}, {"Sussex", "Delaware", "10005"}]

Now, when it gets to Texas,
state = Texas
number of counties = 254

So, how do I declare an array that can accommodate both sizes?

Appreciate any help. I'm developing a Windows Form application using Visual Studio 2015.



Marilyn Gambone

Continue reading...
 
Back
Top