I have the following method signature:
public void MyFunction(Object[,] obj)
I create this object:
List&
No. In fact, these aren't necessarily compatible arrays.
[,]
defines a multidimensional array. List
would correspond more to a jagged array ( >
object[][]
).
The problem is that, with your original object, each List
contained in the list of lists can have a different number of objects. You would need to make a multidimensional array of the largest length of the internal list, and pad with null values or something along those lines to make it match.