ImmutableArray<T>.IndexOf 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.
Overloads
IndexOf(T) |
Searches the array for the specified item. |
IndexOf(T, Int32) |
Searches the array for the specified item. |
IndexOf(T, Int32, IEqualityComparer<T>) |
Searches the array for the specified item. |
IndexOf(T, Int32, Int32) |
Searches the array for the specified item. |
IndexOf(T, Int32, Int32, IEqualityComparer<T>) |
Searches the array for the specified item. |
IndexOf(T)
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
Searches the array for the specified item.
public:
virtual int IndexOf(T item);
public int IndexOf (T item);
abstract member IndexOf : 'T -> int
override this.IndexOf : 'T -> int
Public Function IndexOf (item As T) As Integer
Parameters
- item
- T
The item to search for.
Returns
The zero-based index position of the item if it is found, or -1 if it is not.
Implements
Applies to
IndexOf(T, Int32)
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
Searches the array for the specified item.
public:
int IndexOf(T item, int startIndex);
public int IndexOf (T item, int startIndex);
member this.IndexOf : 'T * int -> int
Public Function IndexOf (item As T, startIndex As Integer) As Integer
Parameters
- item
- T
The item to search for.
- startIndex
- Int32
The index at which to begin the search.
Returns
The zero-based index position of the item if it is found, or -1 if it is not.
Applies to
IndexOf(T, Int32, IEqualityComparer<T>)
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
Searches the array for the specified item.
public:
int IndexOf(T item, int startIndex, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public int IndexOf (T item, int startIndex, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public int IndexOf (T item, int startIndex, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
member this.IndexOf : 'T * int * System.Collections.Generic.IEqualityComparer<'T> -> int
Public Function IndexOf (item As T, startIndex As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer
Parameters
- item
- T
The item to search for.
- startIndex
- Int32
The index at which to begin the search.
- equalityComparer
- IEqualityComparer<T>
The equality comparer to use in the search.
Returns
The zero-based index position of the item if it is found, or -1 if it is not.
Applies to
IndexOf(T, Int32, Int32)
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
Searches the array for the specified item.
public:
int IndexOf(T item, int startIndex, int count);
public int IndexOf (T item, int startIndex, int count);
member this.IndexOf : 'T * int * int -> int
Public Function IndexOf (item As T, startIndex As Integer, count As Integer) As Integer
Parameters
- item
- T
The item to search for.
- startIndex
- Int32
The index at which to begin the search.
- count
- Int32
The number of elements to search.
Returns
The zero-based index position of the item if it is found, or -1 if it is not.
Applies to
IndexOf(T, Int32, Int32, IEqualityComparer<T>)
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
- Source:
- ImmutableArray_1.cs
Searches the array for the specified item.
public:
virtual int IndexOf(T item, int startIndex, int count, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public int IndexOf (T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public int IndexOf (T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
abstract member IndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> int
override this.IndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> int
Public Function IndexOf (item As T, startIndex As Integer, count As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer
Parameters
- item
- T
The item to search for.
- startIndex
- Int32
The index at which to begin the search.
- count
- Int32
The number of elements to search.
- equalityComparer
- IEqualityComparer<T>
The equality comparer to use in the search.
Returns
The zero-based index position of the item if it is found, or -1 if it is not.
Implements
Applies to
.NET