ImmutableList.IndexOf ImmutableList.IndexOf ImmutableList.IndexOf ImmutableList.IndexOf Method

Definition

Overloads

IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32)

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element.

IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32)

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element.

IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T)

Searches for the specified object and returns the zero-based index of the first occurrence within the list.

IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>)

Searches for the specified object and returns the zero-based index of the first occurrence within the list.

IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32)

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static int IndexOf(System::Collections::Immutable::IImmutableList<T> ^ list, T item, int startIndex);
public static int IndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item, int startIndex);
static member IndexOf : System.Collections.Immutable.IImmutableList<'T> * 'T * int -> int
<Extension()>
Public Function IndexOf(Of T) (list As IImmutableList(Of T), item As T, startIndex As Integer) As Integer

Type Parameters

T

The type of items in the list.

Parameters

item

The object to locate in the Immutable list. The value can be null for reference types.

startIndex
Int32 Int32 Int32 Int32

The zero-based starting index of the search. 0 (zero) is valid in an empty list.

Returns

The zero-based index of the first occurrence of item within the range of elements in the Immutable list that extends from index to the last element, if found; otherwise, -1.

IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32)

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static int IndexOf(System::Collections::Immutable::IImmutableList<T> ^ list, T item, int startIndex, int count);
public static int IndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item, int startIndex, int count);
static member IndexOf : System.Collections.Immutable.IImmutableList<'T> * 'T * int * int -> int
<Extension()>
Public Function IndexOf(Of T) (list As IImmutableList(Of T), item As T, startIndex As Integer, count As Integer) As Integer

Type Parameters

T

The type of items in the list.

Parameters

item

The object to locate in the Immutable list. The value can be null for reference types.

startIndex
Int32 Int32 Int32 Int32

The zero-based starting index of the search. 0 (zero) is valid in an empty list.

count
Int32 Int32 Int32 Int32

The number of elements in the section to search.

Returns

The zero-based index of the first occurrence of item within the range of elements in the Immutable list that extends from index to the last element, if found; otherwise, -1.

IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T)

Searches for the specified object and returns the zero-based index of the first occurrence within the list.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static int IndexOf(System::Collections::Immutable::IImmutableList<T> ^ list, T item);
public static int IndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item);
static member IndexOf : System.Collections.Immutable.IImmutableList<'T> * 'T -> int
<Extension()>
Public Function IndexOf(Of T) (list As IImmutableList(Of T), item As T) As Integer

Type Parameters

T

The type of items in the list.

Parameters

item

The object to locate in the list. The value can be null for reference types.

Returns

The zero-based index of the first occurrence of item within the range of elements in the list that extends from index to the last element, if found; otherwise, -1.

IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>)

Searches for the specified object and returns the zero-based index of the first occurrence within the list.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static int IndexOf(System::Collections::Immutable::IImmutableList<T> ^ list, T item, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public static int IndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
static member IndexOf : System.Collections.Immutable.IImmutableList<'T> * 'T * System.Collections.Generic.IEqualityComparer<'T> -> int
<Extension()>
Public Function IndexOf(Of T) (list As IImmutableList(Of T), item As T, equalityComparer As IEqualityComparer(Of T)) As Integer

Type Parameters

T

The type of items in the list.

Parameters

item

The object to locate in the Immutable list. The value can be null for reference types.

equalityComparer
IEqualityComparer<T> IEqualityComparer<T> IEqualityComparer<T> IEqualityComparer<T>

The equality comparer to use in the search.

Returns

The zero-based index of the first occurrence of item within the range of elements in the immutable list that extends from index to the last element, if found; otherwise, -1.

Applies to