ListDictionary.Add Method adds an entry with the specified key and value into the ListDictionary.
Imports System
Imports System.Collections
Imports System.Collections.Specialized
Public Class SamplesListDictionary
Public Shared Sub Main()
Dim myCol As New ListDictionary()
myCol.Add("A", "a")
myCol.Add("B", "b")
myCol.Add("C", "c")
PrintKeysAndValues(myCol)
End Sub 'Main
Public Shared Sub PrintKeysAndValues(myCol As IDictionary)
Console.WriteLine(" KEY VALUE")
Dim de As DictionaryEntry
For Each de In myCol
Console.WriteLine(" {0,-25} {1}", de.Key, de.Value)
Next de
Console.WriteLine()
End Sub
End Class