I have two Arrays:
- an
object[,]Array - an
object[][]Array.
I want to copy the values from the object[,] array to the object[][] array.
I have tried something like that
object[,] array1 = new object[arraySize, 4]; //Here are some values inside
object[][] array2 = new object[arraySize][];
for (int i = 0; i < arraySize; i++)
{
array2[i][0] = array1[i, 0];
array2[i][1] = array1[i, 1];
array2[i][2] = array1[i, 2];
array2[i][3] = array1[i, 3];
}
But I got a NullReferenceException:
Object reference not set to an instance of an object.
arrayCounter2and not justi?