Imports System
Imports System.Collections
Imports System.Collections.Specialized
Public Class SamplesStringDictionary
Public Shared Sub Main()
Dim myCol As New StringDictionary()
myCol.Add("red", "R")
myCol.Add("green", "G")
myCol.Add("blue", "B")
PrintKeysAndValues(myCol)
End Sub 'Main
Public Shared Sub PrintKeysAndValues(myCol As StringDictionary)
Dim de As DictionaryEntry
For Each de In myCol
Console.WriteLine(" {0,-10} {1}", de.Key, de.Value)
Next de
End Sub
End Class