Hi,
I'm developing in C# and the problem I'm trying to solve it's quite
simple... Actually I'm using an Hashtable to store key-value pair, but I
need to keep the insertion order.
=====================================
Hashtable ht = new Hashtable();
ht.Add("First", 1);
ht.Add("Second", 2);
ht.Add("Third", 3);
foreach(string key in ht.Keys)
{
Console.Write(ht[key].toString());
}
====================================
I need a result like this:
1
2
3
I've seen that Hashtable doesn't keep the insertion order, and each
element is ordered by an HashCode... the only usefull object I've found
is Queue object, but I can't store key-value pair inside of it.
Please help.
Thanks (-:
MAX