Hashtable IEqualityComparer

G

Guest

Hi,

I used to have this with .NET 1.1:

Dim objDict As Hashtable = New Hashtable(New
CaseInsensitiveHashCodeProvider(), New CaseInsensitiveComparer())

but when I code the above statement in VS.NET 2005, a warning pops up with
this message:

"Public Sub New(....) is obsolete. Please use Hashtable (IEqualityComparer)
instead"

However, I wasn't able to find any useful information regarding the
IEqualityComparer method. Can someone shed some lights? How do I use
IEqualityComparer in .NET 2.0 to make a Hashtable that acts like this one

New Hashtable(New CaseInsensitiveHashCodeProvider(), New
CaseInsensitiveComparer())

in .NET 1.1?

Thanks in advance!
 

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

Top