Reputation: 273
I have n-dimensional array which I am creating by using:
var arrayND = Array.CreateInstance(typeof(int), sqs.Select(n => n.Count).ToArray());
I don't know the number of dimensions at compile time. Is there a way to pass the array as a parameter when I don't know the number of dimensions? Thanks.
Upvotes: 0
Views: 287
Reputation: 6463
The System.Array
class is the base class for all arrays in the CLR. You can pass it as your parameter.
Upvotes: 2