M
Mark Rae
Hi,
In v1.x, I used to use the following code to create a case-insensitive
Hashtable:
Hashtable MyHashtable = new
Hashtable(CaseInsensitiveHashCodeProvider.Default,
CaseInsensitiveComparer.Default);
In v2, this generates the following warnings:
Warning 1 'System.Collections.CaseInsensitiveHashCodeProvider' is obsolete:
'Please use StringComparer instead.
Warning 4
'System.Collections.Hashtable.Hashtable(System.Collections.IHashCodeProvider,
System.Collections.IComparer)' is obsolete: 'Please use
Hashtable(IEqualityComparer) instead.
However, when I go to the online Help for Hashtable, that's pretty much the
code it still suggests.
Can anyone please tell me the v2 way of creating a case-insensitive
Hashtable?
Any assistance gratefully received.
Mark
In v1.x, I used to use the following code to create a case-insensitive
Hashtable:
Hashtable MyHashtable = new
Hashtable(CaseInsensitiveHashCodeProvider.Default,
CaseInsensitiveComparer.Default);
In v2, this generates the following warnings:
Warning 1 'System.Collections.CaseInsensitiveHashCodeProvider' is obsolete:
'Please use StringComparer instead.
Warning 4
'System.Collections.Hashtable.Hashtable(System.Collections.IHashCodeProvider,
System.Collections.IComparer)' is obsolete: 'Please use
Hashtable(IEqualityComparer) instead.
However, when I go to the online Help for Hashtable, that's pretty much the
code it still suggests.
Can anyone please tell me the v2 way of creating a case-insensitive
Hashtable?
Any assistance gratefully received.
Mark