1

私はこの辞書を持っています:

Dim chardict As Dictionary(Of Char, Integer) = Nothing
chardict.Add("A", 0)
chardict.Add("B", 1)

次のステートメントを実行したいのですがif、構文に少しこだわっています。

if chardict.containskey("A")
    'display the value that corrosponds to the letter "A"
    'in this case display the character 0
    [some code]
end if
4

3 に答える 3

-1

あなたの構文は正しいようです

If dictionary.ContainsKey("A") Then
    Do
End If

どのようなエラーが発生していますか?

于 2012-02-22T10:35:05.373 に答える