Suppose that my function gets a two dimensional array as input and its dimensions are unknown. How can I figure them out using reflection?
+4
A:
You don't need reflection for this.
You can call the GetLength
method of the Array
class and pass the dimension index.
SLaks
2010-01-13 02:36:23
Oooh... I saw the method in my searches and for some reason assumed it didn't accept any parameters... Guess I should've read further.Well, thanks.
EpsilonVector
2010-01-13 02:40:42