I understand that a dictionary is not an ordered collection and one should not depend on the order of insertion and retrieval in a dictionary.
However, this is what I noticed:
- Added 20 key value pairs to a Dictionary
- Retrieved them by doing a foreach(KeyValuePair...)
The order of retrieval was same as the order in which they were added. Tested for around 16 key value pairs.
Is this by design?