Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Hashtable.EqualityComparer Property

Gets the IEqualityComparer to use for the Hashtable.

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

protected IEqualityComparer EqualityComparer { get; }
/** @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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft