FileBackedHashSetT, TElem(IEnumerableT) Constructor

Creates a new instance of the FileBackedHashSetT class.

Definition

Namespace: Gemstone.IO.Collections
Assembly: Gemstone.IO (in Gemstone.IO.dll) Version: 1.0.156 -- Release Build+6a9f88f477f6aa18d5026c0c0fcc061b1aaed2d2
public FileBackedHashSet(
	IEnumerable<T> enumerable
)

Parameters

enumerable  IEnumerableT
The enumerable whose elements are copied to this hash set.

Remarks

This constructor uses the default equality comparer for file backed lookup tables, which is not the same as the default equality comparer for T objects. This is because the default implementation of GetHashCode does not provide guarantees about consistency across platforms, or even implementations of the CLR. Instead, the default equality comparer uses a byte-for-byte comparison to determine equality between keys and a CRC-32 for its hash code implementation. This means the performance of the hashing function is dependent on the performance of the serialization function.

Exceptions

ArgumentNullExceptionenumerable is null.
InvalidOperationExceptionT cannot be serialized.

See Also