Signup as a Tutor

As a tutor you can connect with more than a million students and grow your network.

VbScript Dictionary Objects

19/12/2017 0 0

Dictionary objects are key value pairs object.One of the use of dictionary can be  to find unique elements in a given set of data.

Below is the example of the methods that can be used in dictionary:

Set objDict=CreateObject(“Scripting.Dictionary”)

objDict.Add “1”,”test6″    ‘Add method is used to add unique key with a value to dictionary

objDict.Add “2”,”test2″

objDict.Add “3”,”test3″

objDict.Add “7”,”test7″

‘msgbox objDict.CompareMode

‘msgbox objDict.Count ‘Count method return the no of key-value pairs present in the dictionary.

objDict.Key(“1″)=”6” ‘key method is used to read/modify the value associated with the key

‘msgbox objDict.Exists(“6”) ‘Exists method check whether the given key is present in the dictionary or not.return value is true/false

keys=objDict.Keys ‘keys method returns a collection of all the keys present in the dictionary

For each key in keys

msgbox objDict.Item(key) ‘Item method return the value stored for the specified key.

0 Dislike
Follow 2

Please Enter a comment


Other Lessons for You

Union Based SQL Injection | DVWA (Legal)
Union Based Injection:Technology: phpDatabase: MysqlThe main objective of this injection is to access database, of the website, by just given some malicious sql inputs in front end and get an access of...

Palvinder Singh | 11 Jan

0 0
Sap Hana: How To Start Hana Studio & Start Hana System To Understand The Components And Views?
D-Click on SAP HANA Studio from the desktop. Use the login your user name and password which you got from the system adminstrator. Once login in to HANA system. Click on Add System if need to add first...

Mohamed S | 11/09/2017

1 1
Preparation Of Study Plan For PMP Exam Certification Tips
PMP Exam Study Plan: Preparing for the PMP exam is quite unlike what you did in school and college. Here the focus is not on memorization, but understanding the concepts, best practices, guidelines, and...

Icertglobal | 19/08/2017

0 0
Selenium Testing
Many, perhaps most, software applications today are written as web-based applications to be run in an Internet browser. The effectiveness of testing these applications varies widely among companies and...

Pradeep M | 19/08/2017

0 0
What Is Shell Scripting?
Friends, Let us first understand what is shell? Shell is a layer on Unix Operating System. Shell is a user interface to Operating System. A user can communicate with Unix operating System through shell....

Sonal S. | 19/08/2017

2 0

Looking for IT Courses ?

Find best IT Courses in your locality on UrbanPro.

Do you offer IT Courses ?

Create Free Profile »

Find Best IT Courses ?

Find Now »