KGy SOFT

FastLookupCollectionTCheckConsistency Property

KGy SOFT Core Libraries Help
Gets or sets whether consistency of the stored items should be checked when items are get or set in the collection.
Default value: , if the FastLookupCollectionT was initialized by the default constructor; otherwise, as it was specified.

Namespace:  KGySoft.Collections.ObjectModel
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 6.0.0-rc.1
Syntax

public bool CheckConsistency { get; set; }

Property Value

Type: Boolean
Remarks

If CheckConsistency is , then the FastLookupCollectionT class is tolerant with direct modifications of the underlying collection but when inconsistency is detected, the cost of IndexOf and Contains methods can fall back to O(n) where n is the count of the elements in the collection.

Caution note Caution
Do not store elements in a FastLookupCollectionT that may change their hash code while they are added to the collection. Finding such elements may fail even if CheckConsistency is .
See Also

Reference