ArrayList.IndexOf Method (Object, Int32)
Searches for a specified object within that portion of the ArrayList collection starting at a specified index number and ending at the last object in the collection. Returns the zero-based index number of the first occurrence of that object (if any) within the specified portion of the collection.
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Syntax
public virtual int IndexOf (
Object value,
int startIndex
)
Parameters
- value
A specified object contained in the ArrayList collection. This value can be a null reference. - startIndex
The zero-based index number where you want the search to start.
Return Value
The zero-based index number of the first occurrence of the specified object (if any) within that portion of the ArrayList collection starting at a specified index number and ending at the last object in the collection. If there are no such occurrences, this method returns -1.
Remarks
The ArrayList collection is searched forward, starting at the specified index number and ending at the last object in the collection.
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
ArrayList Class
ArrayList Members
System.Collections Namespace