Freigeben über


IDebugArrayField::GetRank

Gets the rank or number of dimensions of the array.

HRESULT GetRank( 
   DWORD* pdwRank
);
int GetRank(
   out uint pdwRank
);

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).

See Also

Reference

IDebugArrayField