I am using Visual Studio 2010 with Visual Basic. I have a dynamic 2 dimensional array that is coming into the function. I cannot figure out how to get the size of first row.
For example let say this array is passe into the function:
{{1, 0, 5, 4},
{8, 1, 4, 4},
{0, 1, 4, 4},
{7, 7, 7, 4},
{7, 7, 7, 4},
{8, 1, 4, 4}}
In this example I would get 4 because if you look at for example first row it has 4 elements. And for example in this case:
{{1, 0, 5, 4, 7, 7},
{8, 1, 4, 4, 7, 7},
{0, 1, 4, 4, 8, 8},
{7, 7, 7, 4, 3, 3},
{7, 7, 7, 4, 4, 4},
{8, 1, 4, 4, 1, 9}}
I would get back 6 cause rows have 6 elements in it. The array is coming in always 2d and rows are always the same length. Column size is unknown and row size in unknown. But if I find out row size for one row the all rows are that size if that makes sense.
I have tried this UBound(inArray, 1) but it does not work. Please help me figure this out.