IDebugArrayField::GetRank
Gets the rank or number of dimensions of the array.
Syntax
Parameters
pdwRank
[out] Returns the rank.
Return Value
If successful, returns S_OK; otherwise, returns an error code.
Remarks
The rank of an array corresponds to the number of dimensions. In C++ and C#, multi-dimensional arrays are really arrays of arrays and can therefore be considered just a one-dimensional array (and the GetRank
method always returns 1). In Visual Basic, on the other hand, multi-dimensional arrays are handled differently and the rank of such an array reflects the number of dimensions (and the GetRank
method always returns the number of dimensions).