Skip to main content
Tab

ListEditItemCollectionBase.IndexOfValue(Object) Method

Searches for the item by its associated value and returns the zero-based index of its first occurrence within the collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public int IndexOfValue(
    object value
)

Parameters

Name Type Description
value Object

A Object value that is the value associated with the item which is to be located in the collection.

Returns

Type Description
Int32

The zero-based index of the first occurrence of the specified item within the collection, if found; otherwise negative one (-1).

Remarks

The IndexOfValue method finds the item by its associated value within the current collection.

This method searches the collection for the specified item and if found, returns the index value of its first occurrence. If no instance is found, a negative one (-1) is returned. The collection is searched in a forward direction starting at the first element and ending at the last element.

See Also