KGy SOFT

FastBindingListTFind Method (String, Object)

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

public int Find(
	string propertyName,
	Object key
)

Parameters

propertyName
Type: SystemString
A property name of T to search on.
key
Type: SystemObject
The value of the specified property to search for.

Return Value

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

ExceptionCondition
ArgumentNullExceptionpropertyName is .
ArgumentExceptionpropertyName has no corresponding PropertyDescriptor in T.
Remarks

To customize the behavior override the FindCore method in a derived class.

Note Note
propertyName cannot be . To search by the whole value of T rather than by one of its properties use the IndexOf method.
See Also

Reference