.NET Framework Class Library  

CaseInsensitiveHashCodeProvider Class

Supplies a hash code for an object, using a hashing algorithm that ignores the case of strings.

For a list of all members of this type, see CaseInsensitiveHashCodeProvider Members.

System.Object
   System.Collections.CaseInsensitiveHashCodeProvider

[Visual Basic]
<Serializable>
Public Class CaseInsensitiveHashCodeProvider
   Implements IHashCodeProvider
[C#]
[Serializable]
public class CaseInsensitiveHashCodeProvider : IHashCodeProvider
[C++]
[Serializable]
public __gc class CaseInsensitiveHashCodeProvider : public
   IHashCodeProvider
[JScript]
public
   Serializable
class CaseInsensitiveHashCodeProvider implements
   IHashCodeProvider

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

CaseInsensitiveHashCodeProvider implements the IHashCodeProvider interface supporting case-insensitive comparisons on strings, just as CaseInsensitiveComparer implements the IComparer interface supporting case-insensitive comparisons on strings.

The objects used as keys by a Hashtable are required to implement or inherit the Object.GetHashCode method (or the IHashCodeProvider interface) and the Object.Equals method (or the IComparer interface). The implementation of both methods or interfaces must handle case sensitivity the same way; otherwise, the Hashtable might behave incorrectly. For example, when creating a Hashtable, you must use this class with the CaseInsensitiveComparer class or any case-insensitive IComparer implementation.

Requirements

Namespace: System.Collections

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

Assembly: Mscorlib (in Mscorlib.dll)

See Also

CaseInsensitiveHashCodeProvider Members | System.Collections Namespace | Hashtable | IHashCodeProvider | Thread.CurrentCulture | System.Globalization.CultureInfo | CaseInsensitiveComparer | Performing Culture-Insensitive String Operations in Collections