NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ArrayList.IndexOf (Object, Int32)

Searches the ArrayList from the specified index to the end for the specified Object and returns the index of the first occurrence.

[Visual Basic]
Overloads Overridable Public Function IndexOf( _
   ByVal value As Object, _
   ByVal startIndex As Integer _
) As Integer
[C#]
public virtual int IndexOf(
   object value,
   int startIndex
);
[C++]
public: virtual int IndexOf(
   Object* value,
   int startIndex
);
[JScript]
public function IndexOf(
   value : Object,
   startIndex : int
) : int;

Parameters

value
The Object to search for.
startIndex
The index at which the search should start.

Return Value

The index of the first occurrence of value in the ArrayList within the range startIndex through the end of the ArrayList, if found; otherwise,-1.

Exceptions

Exception Type Condition
ArgumentException startIndex is less than zero.

-or-

startIndex is equal to or greater than Count.

Remarks

This method can be overridden by a derived class.

The ArrayList is searched forwards starting at startIndex and ending at the last element.

See Also

ArrayList Class | ArrayList Members | System.Collections Namespace | ArrayList.IndexOf Overload List | LastIndexOf