Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
HashDictionary Constructor (IDictionary, Single, IEqualityComparer)
HashDictionary Class See Also

Oracle® Coherence .NET API Reference Release 3.6.1
E18812-01
Initializes a new instance of the HashDictionary class by copying the elements from the specified dictionary to the new HashDictionary object. The new HashDictionary object has an initial capacity equal to the number of elements copied, and uses the specified load factor and IEqualityComparer object.

Namespace: Tangosol.Util.Collections
Assembly: Coherence (in Coherence.dll) Version: 3.6.1.0 (3.6.1.0)

# Syntax

C#
    public HashDictionary(
    	IDictionary d,
    	float loadFactor,
    	IEqualityComparer equalityComparer
    )

#### Parameters

d
  Type: System.Collections..::.IDictionary
  The IDictionary object to copy to a new HashDictionary object.

loadFactor
  Type: System..::.Single
  A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets.

equalityComparer
  Type: System.Collections..::.IEqualityComparer
  The IEqualityComparer object that defines the hash code provider and the comparer to use with the HashDictionary. -or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of GetHashCode()()() and the default comparer is each key's implementation of Equals(Object).

# Exceptions

Exception | Condition
--- | ---
System..::.ArgumentNullException | d is null.
System..::.ArgumentOutOfRangeException | loadFactor is less than 0.1.-or- loadFactor is greater than 1.0.

# See Also

HashDictionary Class
HashDictionary Overload
Tangosol.Util.Collections Namespace