How to get the size (number of elements) of an indexer class object?
<p>Given a function which accepts a parameter with the following interface:</p>

<pre><code>interface ITest
{
    String this[Int32 dataId, Int32 rowId] { get; set; }
}
</code></pre>

<p>How can I determine the number of elements in each dimension of the indexer?</p>

<p>For example if a function receives an array one could use the .GetUpperBound method:</p>

<pre><code>Int32 GetSizeOfDimension(Array test, Int32 dimension)
{
    return test.GetUpperBound(dimension);
}
</code></pre>

<p>I'm trying to do the following:</p>

<pre><code>    Int32 GetSizeOfDimension(ITest test, Int32 dimension)
    { 
        // return UBound of test's given dimension
    }
</code></pre>
