[Serializable] |
The objects used as keys by a Hashtable are typically required to implement or inherit the Object.GetHashCode and Object.Equals methods, which are case-sensitive. In order to ignore the case in strings, the Hashtable constructor must be passed a reference to an object that derives from both the CaseInsensitiveHashCodeProvider class and the CaseInsensitiveComparer class, so that CaseInsensitiveHashCodeProvider.GetHashCode and CaseInsensitiveComparer.Compare can be used instead.
ctor #1 | Overloaded:.ctor() Default constructor. This constructor is called by derived class constructors to initialize state in this type.Initializes a new instance of the CaseInsensitiveHashCodeProvider class using the current CultureInfo. |
ctor #2 | Overloaded:.ctor(CultureInfo culture) Initializes a new instance of the CaseInsensitiveHashCodeProvider class using the current CultureInfo. |
Default | Read-only Gets an instance of CaseInsensitiveHashCodeProvider that is always available. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode (inherited from System.Object) |
Overloaded:GetHashCode() See base class member description: System.Object.GetHashCodeDerived from System.Object, the primary base class for all objects. |
GetHashCode | Overloaded:GetHashCode(object obj) Returns a hash code for the given object, using a hashing algorithm that ignores the case of strings. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public CaseInsensitiveHashCodeProvider(); |
public CaseInsensitiveHashCodeProvider( |
culture
Exception Type | Condition |
---|---|
ArgumentNullException | culture is null. |
public static CaseInsensitiveHashCodeProvider Default {get;}
|
~CaseInsensitiveHashCodeProvider(); |
public virtual int GetHashCode(); |
obj
Exception Type | Condition |
---|---|
ArgumentNullException | obj is null. |
public Type GetType(); |
protected object MemberwiseClone(); |
public virtual string ToString(); |