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!

Array.LastIndexOf (Array, Object)

Determines the index of the last occurrence of a value in the entire one-dimensional Array by searching backwards, starting at the last element and ending at the first element.

[Visual Basic]
Overloads Public Shared Function LastIndexOf( _
   ByVal array As Array, _
   ByVal value As Object _
) As Integer
[C#]
public static int LastIndexOf(
   Array array,
   object value
);
[C++]
public: static int LastIndexOf(
   Array* array,
   Object* value
);
[JScript]
public static function LastIndexOf(
   array : Array,
   value : Object
) : int;

Parameters

array
The one-dimensional Array to search.
value
The Object to locate in array.

Return Value

The index of the last occurrence of value in the entire one-dimensional array, or-1 if value does not occur in array.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference (in Visual Basic Nothing).

Remarks

The Array is searched backwards, and the elements are compared to the specified value using the Equals method.

See Also

Array Class | Array Members | System Namespace | Array.LastIndexOf Overload List | IndexOf