Wondering if this is possible.
We have an 3rd Party library that contains identification information about users...
The main interaction with the library is through a HashTable which is keyed with a string, and returns an Object Graph of information for that key.
The problem is, the key is obviously Case Sensitive, but what we get from the users browser doesn't necessarily match the case... (We often get the key fully lowercase'd)
I'm wondering if it's possible to do a case Insensitive key search against a hashtable.
e.g.
Hashtable ht = new Hashtable();
ht.Add("MyKey", "Details");
string result = ht["MyKey"];
string result = ht["MYKEY"];
string result = ht["mykey"];
On the off chance we could submit a support ticket to the company to add this functionality, are there any other DataStructures (i.e. the new generic collections/dictionaries) that support this functionality
Lastly, would it be possible to override the System.String GetHashCode() method, to
make all case invariant strings return the same hashcode... e.g. I'm thinking this is a no goer as string
is a sealed class
Cheers if anyone has any suggestions