Compartilhar via


System.Collections.IList.IndexOf Method

Searches for a specified object in a one-dimensional array and returns the index number of the first occurrence of that object (if any) in the array.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

int System.Collections.IList.IndexOf (
         Object value
)

Parameters

  • value
    The object you want to search for in the current array.

Return Value

The index number of the first occurrence of the specified object (if any) in the current array. If the object is not found in the array, this method returns -1.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

Array Class
Array Members
System Namespace