Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 809
  • Last Modified:

C# Dynamic Multidimension Arrays

Hi Experts,

Does C# have a dynamic multidimension array?

At the moment I am using List<double[]> but surely there is a more appropriate collection?

Just to note the double[,] will not suffice as I want to be able to expand and shrink the array dynamically.

Thanks,
j
0
XPUSR
Asked:
XPUSR
2 Solutions
 
philipjonathanCommented:
I don't think there is any such array off-the-shelf. But probably you can use List of List? It's close to what you are using now. The difference is, it can expand or shrink on both dimensions.
0
 
Jaime OlivaresCommented:
why not List<List<double>> ?
Every element can have any size in both "vertical" and "horizontal" dimensions.


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now