FastBindingListTFind(String, Object) Method

Searches for the index of the item that has the specified property descriptor with the specified value.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public int Find(
	string propertyName,
	Object key
)

Parameters

propertyName  String
A property name of T to search on.
key  Object
The value of the specified property to search for.

Return Value

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

Remarks

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

  Note

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

Exceptions

ArgumentNullExceptionpropertyName is .
ArgumentExceptionpropertyName has no corresponding PropertyDescriptor in T.

See Also