vb.net - Accessing the key/value of a dictionary -


how access key/value of dictionary? have code:

    try           if keystrokedictionary.containskey(letter)             keystrokedictionary.keys.equals(letter)         end if      catch ex exception         msgbox(ex.message)     end try     return letter 

letter single letter gets passed in string value. keystrokedictionary dictionary information looks this:

{[65, 0]} {[66, 1]} {[67, 2]} 

where key first number , value second number. since code isn't looking @ key/value right, it's not returning letter, , therefore not working.

.equals() not assignment operator, comparison function.

try

letter = " ";  if keystrokedictionary.containskey(letter)    letter = keystrokedictionary.values(letter) end if  return letter 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -