Module Module1
Sub Main()
Dim test = New Dictionary(Of String, String)()
test.Add(
"one",
"value")
' Use TryGetValue for exception-free code.
Dim value As String = Nothing
If test.TryGetValue(
"two", value)
Console.WriteLine(
"Found")
Else
Console.WriteLine(
"Not found")
End If
End Sub
End Module
Not found