I am trying to create a jagged array but due to the dynamic-ness of the data I am working with I do not want to waste resources creating a a large jagged array.
I am currently doing:
int[][][] data = new data[Int16.MaxValue][][];
I do not how big the data set is, or is there a better way than doing it via Lists?
Yes, you should use
List<T>.In this case, you would use
List<List<List<int>>>.Your array:
int[][][] data = new data[Int16.MaxValue][Int16.MaxValue][Int16.MaxValue];will take up (2^16)^3 = 2^48 = way more storage space than you have,
not to mention that that declaration is not valid C#.