Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
Like most collections, the Dictionary object has a Count property that returns the number of key-item pairs in the collection. The script in Listing 4.46 creates an instance of the Dictionary object, adds three key-item pairs, and then echoes the value of the Count property.
Listing 4.46 Determining the Number of Key-Item Pairs in a Dictionary
|
|
When this script runs, the value 3 (the number of key-item pairs in the collection) will be echoed to the screen.
Send us your feedback | « Previous | Next » |