Abstract utility objects  HandyCollection.Add method
Appends the given item to collection and assigns it the specified key value. You can later use the key value to index the item in collection.

Syntax:

index = HandyCollection.Add(key, item)

IDL definition:

[id(1), helpstring("Adds item to the collection")]
HRESULT Add([in] VARIANT varKey,[in] VARIANT varItem,[out,retval] VARIANT* pvarPlace);

Parameters:

key - the value assigned as key of that item in collection and later used for indexing. Should be unique in collection.
item - Item being added to collection.
index
- 1-based index of the item in collection.

Remarks:

If key parameter is already used in collection the item is not added and index has a value of 0. S_FALSE is returned in HRESULT. Use another key in that case.

Applies to:

HandyCollection object

newObjects Copyright 2001-2006 newObjects [ ]