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

Importance of practical oriented IT training
Hello, Nowadays, there are enormous opportunities in IT field. But the essential thing about IT is that we should have the expertise and best skills of latest IT technologies to survive in IT industry.Moreover,...

Yess InfoTech | 27 Mar

0 0
The ABCs Of Success For A Software Developer
“There is more to know for career advancement rather than focusing on codes and its challenges to become a successful developer”. A developer is the one who creates software application by...
ASP.NET Syllabus
Part 1: Getting Started with ASP.NET Lesson 1: Overview Of Asp.Net Lesson 2: Adding Controls To A Web Page Lesson 3: Web Page Processing Lesson 4: Validating User Input Lesson...

Arvind Yadav | 05 Mar

1 0
The Best Option JavaScript Language For Developers
We already know about JavaScript. But today I will be discussing JavaScript features and JavaScript development process. I was wonder about JavaScript last 10 years. Because JavaScript can give us frontend...

Shibaji Debnath | 19 Feb

0 0
Angular 1 vs Angular 2
Angular team has released the angular 2, which has drastically change the way programmers interact and work with Angular framework in the past. In this post I will tell you the common changes made by...

Shibaji Debnath | 13 Feb

0 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 »