다음을 통해 공유


IDebugArrayObject::GetCount

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets the count of elements in the array.

Syntax

[C++]  
HRESULT GetCount(   
   DWORD* pdwElements  
);  
[C#]  
int GetCount(  
   out uint pdwElements  
);  

Parameters

pdwElements
[out] Returns the count.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

This method sees all of the elements of an array object as a one-dimensional array, even if the array object is multi-dimensional. For example, given the array myarray[3][2][6], this method would return 36 in the pdwElements parameter. Use the GetElement method to retrieve the individual elements one at a time.

See Also

IDebugArrayObject