Enumerator.Item

Applies to TestComplete 15.47, last modified on January 20, 2023

Returns the current item in the collection.

Declaration

EnumObj.Item()
EnumObj     An Enumerator object  
Result     Variant  

Description

Use the Item method to obtain the current item in the collection. Note that Item does not move the enumerator position; the MoveNext method is used for this.

If the collection is empty or the enumerator is positioned at the end of the collection, the Item method throws an exception. To check if the end of the collection has been reached, use the AtEnd method.

Return Value

The current item in the collection.

See Also

Enumerator.AtEnd
Enumerator.MoveFirst
Enumerator.MoveNext

Highlight search results