IList.IndexOf(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
[Android.Runtime.Register("indexOf", "(Ljava/lang/Object;)I", "GetIndexOf_Ljava_lang_Object_Handler:Java.Util.IListInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int IndexOf (Java.Lang.Object? o);
[<Android.Runtime.Register("indexOf", "(Ljava/lang/Object;)I", "GetIndexOf_Ljava_lang_Object_Handler:Java.Util.IListInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member IndexOf : Java.Lang.Object -> int
Parameters
- o
- Object
element to search for
Returns
the index of the first 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 first occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the lowest index i
such that Objects.equals(o, get(i))
, or -1 if there is no such index.
Java documentation for java.util.List.indexOf(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.