In C# how do i initialize
int[][] test;
I don’t want to use int[,] instead. I am asking specifically how to initialize the above. The obvious = int[1][1] does not work. I tried a few different ways with no luck and [][] is not really google-able unfortunately (unless its possible!?)
It’s called jagged arrays if you want to Google it.
Basically you can initialize the first dimension in the traditional way :
And you manually initialize the others :