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;
The index of the last occurrence of value in the entire one-dimensional array, or-1 if value does not occur in array.
Exception Type | Condition |
---|---|
ArgumentNullException | array is a null reference (in Visual Basic Nothing). |
The Array is searched backwards, and the elements are compared to the specified value using the Equals method.
Array Class | Array Members | System Namespace | Array.LastIndexOf Overload List | IndexOf