I use an array of array :
object[][] of =new object[lenght2][];
Now, what i want is to insert a new array into of[][], I try this :
for (int i = 0; i < lenght2; i++)
{
Act = calcul_resporderbyact(responsable,v); // return array of object
of[i] = Act;
}
i want to know how to use some array from this multidimensional-array ??
You have couple of mistakes, in your code object[,] of =new object[lenght2][];
[,] is not equal to [][]
you can try this:
object[][] of = new object[length2][];
of[i] = Act; //it means you can assign `new[] { new object() };`
Read this: Multidimensional Array [][] vs [,]
it says that [,] is multidimensional array and [][] is array of arrays. So for your use array of arrays is valid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With