Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Container for Jagged Arrays?

$
0
0

I am looking for a way to put all of my jaggedArrays into a container with a length property. I can then use

the length instead of the static int 5 shown below. It will also allow me to add more jagged arrays to

the container without having to change the static variable.

string[][] jaggedArray = new string[5][]; jaggedArray[0] = new string[] { "one", "two", "three", "four", "five", "six" }; jaggedArray[1] = new string[] { "one", "two", "three", "four", "five", "six" }; jaggedArray[2] = new string[] { "one", "two", "three" }; jaggedArray[3] = new string[] { "one", "two", "three", "four" }; jaggedArray[4] = new string[] { "one", "two", "three", "four", "five", "six" };

Thank you



Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>