I want to create a 2-dimensional array, without knowing the size of the first dimension.
For example I have an unknown number of rows, when I create an array. Ever
There is no such thing as dynamic length arrays in .NET. Use a List<>
instead.
The array bounds all need to be known when you instantiate an array. What may have confused you is that this seems to be different for jagged arrays, but it's not: since it is an array of arrays, when you instantiate it it will be an array of uninstantiated arrays (e.g. null
references). You then need to allocate each of those arrays again to use them.