1.

What Is Dictionary Object In Vbscript? Explain?

Answer»

The Dictionary OBJECT stores name / VALUE pairs (referred to as the key and item respectively) in an array.

Write the below code in a notepad and save it with a .vbs extension and RUN it from COMMAND Prompt by just typing the name of the file.

Dim Beers

Set Beers = CreateObject("Scripting.Dictionary") Beers.Add "a", "Strauss" Beers.Add "b", "Kingfisher" Beers.Add "c", "Budweiser" Msgbox ("The value corresponding to the key'b'is"&Beers.Item("b"))

The Dictionary object has many PROPERTIES like Count, Item, CompareMode etc and many methods like Exists, Add, and Keys etc.

The Dictionary object stores name / value pairs (referred to as the key and item respectively) in an array.

Write the below code in a notepad and save it with a .vbs extension and run it from Command Prompt by just typing the name of the file.

Dim Beers

The Dictionary object has many properties like Count, Item, CompareMode etc and many methods like Exists, Add, and Keys etc.



Discussion

No Comment Found