Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Hashtable.EqualityComparer Property

Gets the IEqualityComparer to use for the Hashtable.

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

'Declaration
Protected ReadOnly Property EqualityComparer As IEqualityComparer
'Usage
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

ArgumentException

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

ADD
Show:
© 2015 Microsoft