EpsilonVector
EpsilonVector

Reputation: 4043

Getting the dimensions of multidimensional arrays in C#

Suppose that my function gets a two dimensional array as input and its dimensions are unknown. How can I figure them out using reflection?

Upvotes: 2

Views: 850

Answers (1)

SLaks
SLaks

Reputation: 887453

You don't need reflection for this.

You can call the GetLength method of the Array class and pass the dimension index.

Upvotes: 6

Related Questions