| << B.0.0- The Scripting Run-Time Library Objects | AppendixB | B.2.0- The Scripting.FileSystemObject Object >> |
The Scripting.Dictionary Object
The Dictionary object provides a useful storage object that we can use to store values accessed and referenced by their name, rather than by index as would be the case in a normal array. The properties and methods exposed by the Dictionary object are:
|
Property |
Description |
|
CompareMode |
(VBScript only). Sets or returns the string comparison mode for the keys. |
|
Count |
Read-only. Returns the number of key/item pairs in the Dictionary. |
|
Item(key) |
Sets or returns the value of the item for the specified key. |
|
Key(key) |
Sets or returns the value of a key. |
|
Method |
Description |
|
Add(key, item) |
Adds the key/item pair to the Dictionary. |
|
Exists(key) |
Returns True if the specified key exists or False if not. |
|
Items() |
Returns an array containing all the items in a Dictionary object. |
|
Keys() |
Returns an array containing all the keys in a Dictionary object. |
|
Remove(key) |
Removes a single key/item pair specified by key. |
|
RemoveAll() |
Removes all the key/item pairs. |
* An error will occur if we try to add a key/item pair when that key already exists, remove a key/item pair that doesn't exist, or change the CompareMode of a Dictionary object that already contains data.
| << B.0.0- The Scripting Run-Time Library Objects | AppendixB | B.2.0- The Scripting.FileSystemObject Object >> |

RSS
