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());
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top