I need a delphi key / value collection that will allow me to iterate over the collection in the same order in which the key / value pairs were inserted / added.
TList<T> guarantees order, but TDictionary<T1, T2> does not.
I guess I could always define TList<TPair<Key, Value>> , but it would be much harder to work with.
Is there a built-in collection type that suits my requirements or could wrap TList<TPair<Key, Value>> best option? Or perhaps it would be better to have a TList<Key> and a TDictionary<Key, Value> and TDictionary<Key, Value> over the list.
Kenneth cochran
source share