IList.LastIndexOf(Object) Method

Definition

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.

[Android.Runtime.Register("lastIndexOf", "(Ljava/lang/Object;)I", "GetLastIndexOf_Ljava_lang_Object_Handler:Java.Util.IListInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int LastIndexOf (Java.Lang.Object? o);
[<Android.Runtime.Register("lastIndexOf", "(Ljava/lang/Object;)I", "GetLastIndexOf_Ljava_lang_Object_Handler:Java.Util.IListInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member LastIndexOf : Java.Lang.Object -> int

Parameters

o
Object

element to search for

Returns

the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element

Attributes

Remarks

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the highest index i such that Objects.equals(o, get(i)), or -1 if there is no such index.

Java documentation for java.util.List.lastIndexOf(java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to