String Dictionary - Codoid
Select Page
Codoid Blog

String Dictionary

Being a leading QA Company, we write blogs on all prominent software testing topics and tools using our real-world experience. So stay sharp by subscribing to our Newsletter.

StringDictionary is a Hash Table; it is designed to accept only strings. It could be used to handle large amounts of strings and retrieves item very quickly since it is a Hash Table. Let us see how we can add items to the StringDictionary object and retrieve it.

Code

Dim oStringDict

Set oStringDict=DotNetFactory.CreateInstance("System.Collections.Specialized.StringDictionary")

oStringDict.Add "City1","London"
oStringDict.Add "City2","Paris"

Msgbox oStringDict.Item("City1")

Set oStringDict=Nothing
  

Tags

Dictionary Object, .net StringDictionary

Submit a Comment

Your email address will not be published.


StringDictionary is a Hash Table; it is designed to accept only strings. It could be used to handle large amounts of strings and retrieves item very quickly since it is a Hash Table. Let us see how we can add items to the StringDictionary object and retrieve it.

Code

Dim oStringDict

Set oStringDict=DotNetFactory.CreateInstance("System.Collections.Specialized.StringDictionary")

oStringDict.Add "City1","London"
oStringDict.Add "City2","Paris"

Msgbox oStringDict.Item("City1")

Set oStringDict=Nothing
  

Tags

Dictionary Object, .net StringDictionary