Thursday, March 28, 2024 20:02

Posts Tagged ‘arrays of arrays’

Test your knowledge! – Arrays

Friday, April 7th, 2017
Read more

Arrays of arrays

Friday, April 7th, 2017

C# allows us to have arrays of arrays, which we call jagged arrays. An array of arrays is basically an array in which each row is actually another array on its own.

This is an example of declaration for an array of arrays:

and this is how we initialize it:

Also, the arrays of the array can be one dimensional or multi-dimensional arrays, like we learned:

Finally, getting or setting the elements of an array of an array (lol, that sounds so complicated 😐 ):

Most of the times, arrays of arrays won’t be of a real use to you, there are simpler ways of doing this.… Read more


Follow the white rabbit