I just saw this behavior, and I'm a little surprised by this ...
If I add 3 or 4 elements to the dictionary and then do “For Each” to get all the keys, they will appear in the same order as I do.
The reason that surprises me is that the dictionary should be HashTable internally, so I expected everything to come out in any order (ordered by key hash, right?)
What am I missing here? Is this behavior I can count on?
EDIT: Well, I already thought of many reasons why this could happen (for example, a separate list of entries, whether it is a coincidence, etc.). My question is: does anyone know how this works?
Daniel Magliola Sep 30 '08 at 18:23 2008-09-30 18:23
source share