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.LastIndexOf (Object, Int32, Int32)

Searches a section of the ArrayList for the specified Object and returns the index of the last occurrence.

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

Parameters

value
The Object to search for.
startIndex
The index at which the backward search should start.
endIndex
The index before which the backward search should end.

Return Value

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

Exceptions

Exception Type Condition
ArgumentException startIndex is less than zero.

-or-

startIndex is equal to or greater than Count.

-or-

endIndex is less than zero.

-or-

endIndex is equal to or greater than Count.

Remarks

This method can be overridden by a derived class.

The ArrayList is searched backwards starting at startIndex and ending at endIndex.

See Also

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