I have this dictionary:
Dim chardict As Dictionary(Of Char, Integer) = Nothing
chardict.Add("A", 0)
chardict.Add("B", 1)
I want to do the following if
statement but I am a bit stuck on the syntax:
if chardict.containskey("A")
'display the value that corrosponds to the letter "A"
'in this case display the character 0
[some code]
end if
Your syntax seems correct
If dictionary.ContainsKey("A") Then
Do
End If
what error you are getting?