Hashtable.EqualityComparer Property

Gets the IEqualityComparer to use for the Hashtable.

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)

Protected ReadOnly Property EqualityComparer As IEqualityComparer
Dim value As IEqualityComparer

value = Me.EqualityComparer

/** @property */
protected IEqualityComparer get_EqualityComparer ()

protected function get EqualityComparer () : IEqualityComparer

Not applicable.

Property Value

The IEqualityComparer to use for the Hashtable.

Exception typeCondition


The property is set to a value, but the hash table was created using an IHashCodeProvider and an IComparer.

The IEqualityComparer includes both the comparer and the hash code provider. If an IEqualityComparer is used in the Hashtable constructor, the objects used as keys in the Hashtable are not required to override the Object.GetHashCode and Object.Equals methods.

Retrieving the value of this property is an O(1) operation.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

.NET Compact Framework

Supported in: 2.0

XNA Framework

Supported in: 1.0

Community Additions