Compartir a través de


Count Property

Count Property

Getss the number of objects or collections contained in a collection.

Declaration

[C++]

[propget] HRESULT get_Count ([out, retval] long* Count);

[Microsoft® Visual Basic® 6.0]

Public Property Get Count() As Long

Property Value

long Gets a signed 32-bit integer that specifies the number of objects or collections in the collection.

This property is read-only.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The Count parameter is an invalid pointer.
E_UNEXPECTED Unexpected parameter or property type.
E_INK_EXCEPTION An exception occurred inside the method.
E_FAIL An unspecified error occurred.
REGDB_CLASSNOTREG The InkRecognizers collection is not registered.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example finds the number of IInkTablet objects within a InkTablets collection.

Dim theTablets As New InkTablets
Dim theCount As Long
theCount = theTablets.Count

Applies To