Non-Casesensetive hashtable

  • Thread starter Thread starter A.M
  • Start date Start date
A

A.M

Hi,

By default, HashTable.ContainsValue is case sesetive for string datatype.
Can I have it non-casesensetive?

Thanks
Alan
 
Alan,

You can probably do this by passing an instance of
CaseInsensitiveComparer along with CaseInsensitiveHashCodeProvider (although
the provider part you might not need to pass in).

Hope this helps.
 
A.M said:
Hi,

By default, HashTable.ContainsValue is case sesetive for string datatype.
Can I have it non-casesensetive?

Hashtable insensitive = new Hashtable(
new CaseInsensitiveHashCodeProvider(),
new CaseInsensitiveComparer());
 
Back
Top