How to create 2D jagged array
Posted
by Ram
on Stack Overflow
See other posts from Stack Overflow
or by Ram
Published on 2010-04-04T13:44:12Z
Indexed on
2010/04/04
13:53 UTC
Read the original article
Hit count: 247
.NET
In my code an array is declared as follows private Object[,] cellInfos = new Object[20, 10];
I need to convert it into Jagged array so I wrote following code
private Object[][] cellInfos = { new Object[20],
new Object[10]
};
But it gave me a array with 2 items each of type array.
I need to create 2D array where new Object[20] would be first column and new Object[10] would be the second one.
Thanks.
© Stack Overflow or respective owner