none
How can "For Each key As String In DictOfDataColInfoName.Keys" return a bad key?!?!? RRS feed

  • Question

  • I think I slept well last night, but maybe I am still asleep and having a nightmare because this doesn't seem real.

    Look at this ...

    And the debugger shows that the current value of key is one of the keys in the dictionary.  And I don't think that there is anything wrong with the ToString function because it works just fine in the debugger's Watch window.  (And also is not what the message is complaining about.)  The dictionary is not Nothing - it contains 89 entries.

    Am I just not seeing something or is this as mysterious as I appears to me at the moment?

    Thanks,  Bob

    Friday, August 15, 2014 3:09 PM

Answers

  • Your code seems to be using two different Dictionaries. The Dictionary in your For statement is called DictOfDataColInfoName, but the one in the next statement is called DictOfDataColInfoNum.
    • Marked as answer by eBob.com Friday, August 15, 2014 4:19 PM
    Friday, August 15, 2014 3:16 PM

All replies

  • Your code seems to be using two different Dictionaries. The Dictionary in your For statement is called DictOfDataColInfoName, but the one in the next statement is called DictOfDataColInfoNum.
    • Marked as answer by eBob.com Friday, August 15, 2014 4:19 PM
    Friday, August 15, 2014 3:16 PM
  • Thank you very much Blackwood!  Of course I am embarrassed to have aired my stupidity in public but very grateful to have this problem behind me.  I just was not seeing it.

    Thanks again,  Bob

    Friday, August 15, 2014 4:21 PM