CDicObj.Itemproperty
Sets or returns an item for a specified key in associative array.
Syntax
PROPERTY Item (BYREF dvKey AS DVARIANT) AS DVARIANT
PROPERTY Item (BYREF dvKey AS DVARIANT, BYREF dvNewItem AS DVARIANT)
Parameters
| Name | Description | |
|---|---|---|
dvKey | Key associated with the item being retrieved or added. | |
dvNewItem | The new value associated with the specified key. |
Return value
The item value.
Description
Sets or returns an item for a specified key in associative array.
Remarks
If key is not found when changing an item, a new key is created with the specified dvNewvItem. Contrary to the Dictionary object, if key is not found when attempting to return an existing item, it returns and empty variant and sets the last result code to E_INVALIDARG, instead of creating a new key with its corresponding item empty.
Reference
- Include file
CDicObj.inc - Defined in AfxNova/CDicObj.inc:213
- Documented in Windows/Windows Script/CDicObj Class.md
- Topic: CDicObj Class