Removes an item from the collection.Syntax:
variable = object.Remove(key_or_index)
IDL definition:
[id(5), helpstring("Removes an item")] HRESULT Remove([in] VARIANT varIndex, [out, retval] VARIANT* pvarResult);
Parameters:
object - Previously created VarDictionary object
variable - (optional) variable that will receive a boolean value
indicating the success status
key_or_index - name or index (1-based) of the item to remove.
True/false is returned on success/failure. VARIANT type of the returned value is
VT_BOOL.
Examples:
var success = vardict.Remove("Item 3");
Dim boolSuccess
boolSuccess = vardict.Remove(3)
Remarks:
In C++ projects HRESULT returned can be used to determine success - S_OK is returned on
success and S_FALSE on failure (if the key_or_index was not found in the collection).
Applies to: VarDictionary
See also: Item property, Add method
|