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