A Dictionary object contains a set of key-item pairs
The dictionary object has the following benefits when compared with arrays:
· The size of the Dictionary object can be set dynamically.
· Dictionaries surpass arrays in locating items by their content.
· Dictionaries work better than arrays when accessing random elements frequently.
· The Dictionary object has built-in methods and properties that allow users to manage the dictionary’s contents and keys.
· When deleting an item from a Dictionary, the remaining items are automatically shifted up.
The only disadvantage of dictionaries when compared to arrays, is that they cannot be multidimensional.
Methods:
- Add
- Exists
- Items
- Keys
- Remove
- Removeall
Properties
- Count
- Item
- Key
- Comparemode
No comments:
Post a Comment