CaseInsensitiveHashCodeProvider Class
Supplies a hash code for an object, using a hashing algorithm that ignores the case of strings.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | CaseInsensitiveHashCodeProvider() | Initializes a new instance of the CaseInsensitiveHashCodeProvider class using the Thread.CurrentCulture of the current thread. |
![]() | CaseInsensitiveHashCodeProvider(CultureInfo) | Initializes a new instance of the CaseInsensitiveHashCodeProvider class using the specified System.Globalization.CultureInfo. |
| Name | Description | |
|---|---|---|
![]() ![]() | Default | Gets an instance of CaseInsensitiveHashCodeProvider that is associated with the Thread.CurrentCulture of the current thread and that is always available. |
![]() ![]() | DefaultInvariant | Gets an instance of CaseInsensitiveHashCodeProvider that is associated with CultureInfo.InvariantCulture and that is always available. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetHashCode(Object) | Returns a hash code for the given object, using a hashing algorithm that ignores the case of strings. |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
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 override 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.
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



