KGy SOFT

SortableBindingListTGetItemIndex Method

KGy SOFT Core Libraries Help

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

protected override int GetItemIndex(
	T item
)

Parameters

item
Type: T
The object to locate in the FastLookupCollectionT. The value can be  for reference types.

Return Value

Type: Int32
The zero-based index of the found occurrence of item within the FastLookupCollectionT, if found; otherwise, -1.
Remarks

In FastLookupCollectionT this method has an O(n) cost for the first time or then the internal mapping has to be rebuilt (because, for example, CheckConsistency is  and inconsistency is detected); otherwise, it has an O(1) cost. Inconsistency can happen if the underlying collection has been modified directly instead of accessing it only via this instance.

See Also

Reference