A Hashtable is perfect for storing a section of an ini file in memory because it has the key/value combination like an ini file. So I wish to use a Hash table but there are two features of a Hashtable I don't like.
1. ht["name"] is not the same as ht["Name"] (ie. Case sensitive). For an ini file this is bad because ini files don't need case sensitive text to work. In this case I can't have this case sensitive.
2. Enumerating a hash table wont return the items in the order they were added:
Eg.
While it's not important that I have the items enumerated in the order I add them it would be preferable because creating a new ini file would allow me to write to it in the same order I read them.
Is there something like a Hashtable that will allow me to have the two features above? Thanks in advance for any help.
1. ht["name"] is not the same as ht["Name"] (ie. Case sensitive). For an ini file this is bad because ini files don't need case sensitive text to work. In this case I can't have this case sensitive.
2. Enumerating a hash table wont return the items in the order they were added:
Eg.
Code:
IDictionaryEnumerator en = ht.GetEnumerator();
while (en.MoveNext())
{
MessageBox.Show(en.Key + "=" + en.Value);
}
While it's not important that I have the items enumerated in the order I add them it would be preferable because creating a new ini file would allow me to write to it in the same order I read them.
Is there something like a Hashtable that will allow me to have the two features above? Thanks in advance for any help.