469,602 Members | 1,763 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Non-Casesensetive hashtable

A.M
Hi,

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

Thanks
Alan
Nov 16 '05 #1
2 1197
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"A.M" <no*****@online.nospam> wrote in message
news:ei**************@TK2MSFTNGP12.phx.gbl...
Hi,

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

Thanks
Alan

Nov 16 '05 #2
A.M wrote:
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());

--
mikeb
Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mario | last post: by
25 posts views Thread by Yves Glodt | last post: by
32 posts views Thread by Adrian Herscu | last post: by
8 posts views Thread by Bern McCarty | last post: by
14 posts views Thread by Patrick Kowalzick | last post: by
399 posts views Thread by =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post: by
12 posts views Thread by puzzlecracker | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.