KGy SOFT

SortableBindingListTFindCore Method

KGy SOFT Core Libraries Help
Searches for the index of the item that has the specified property descriptor with the specified value.

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

protected override int FindCore(
	PropertyDescriptor property,
	Object key
)

Parameters

property
Type: System.ComponentModelPropertyDescriptor
A PropertyDescriptor that specifies the property to search for.
key
Type: SystemObject
The value of property to match.

Return Value

Type: Int32
The zero-based index of the item that matches the property descriptor and contains the specified value.
Remarks

If property equals SortProperty, then a binary search is performed, in which case the cost of this method is O(log n) where n is the count of elements in the list.

In any other cases a linear search is performed, in which case the cost of this method is O(n).

See Also

Reference