Imports System.Collections
Public Module Hasher
Dim Tablet As Hashtable = New Hashtable()
Sub Main()
AddToTable()
FindItem("AAA")
FindKey("BBB")
End Sub
Public Sub AddToTable()
Tablet.Add("333", "WWWW")
Tablet.Add("444", "AAA")
Tablet.Add("BBB", "I386")
End Sub
Public Sub FindItem(ByVal item As String)
If Tablet.ContainsValue(item) Then
Console.WriteLine("Found {0} in the hashtable.", item)
End If
End Sub
Public Sub FindKey(ByVal key As String)
If Tablet.ContainsKey(key) Then
Console.WriteLine("Found {0} in the list.", key)
End If
End Sub
End Module
Found AAA in the hashtable.
Found BBB in the list.