Abstract utility objects  HandyCollection.Item property
You can retieve each item from the collection using this property and the key assigned to the item when it was added. This is the default property of the object.


variable = HandyCollection.Item[(key)]
variable = HandyCollection[(key)]

IDL definition:

[propget, id(DISPID_VALUE), helpstring("returns the indexed item")]
HRESULT Item([in,optional] VARIANT varIndex, [out, retval] VARIANT *pVal);


variable - The value which was added in collection under the specified key.
key - (Optional parameter, but normally should be specified) Key value which indexes the desired item in collection.


The internal implementation of the collection object returns error if key paremeter is not specified. Some applications however may implement the feature of returning default value when index is not specified. See the documentation of the partciular application.

Key is unique index in the collection. It is assigned to the item when it is added. If item with such key can't be found in collection, empty VARIANT is returned and S_FALSE value in HRESULT.

Applies to:

HandyCollection object

newObjects Copyright 2001-2006 newObjects [ ]