Uredi

Deli z drugimi prek


ImmutableList<T>.Builder.IndexOf Method

Definition

Overloads

IndexOf(T)

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

IndexOf(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, 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 starts at the specified index and contains the specified number of elements.

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

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the ImmutableList<T>.Builder that starts at the specified index and contains the specified number of elements.

IndexOf(T)

Source:
ImmutableList_1.Builder.cs
Source:
ImmutableList_1.Builder.cs
Source:
ImmutableList_1.Builder.cs

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

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 object to locate in the immutable 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 immutable list, if found; otherwise, -1.

Implements

Applies to

IndexOf(T, Int32)

Source:
ImmutableList_1.Builder.cs
Source:
ImmutableList_1.Builder.cs
Source:
ImmutableList_1.Builder.cs

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:
 int IndexOf(T item, int index);
public int IndexOf (T item, int index);
member this.IndexOf : 'T * int -> int
Public Function IndexOf (item As T, index As Integer) As Integer

Parameters

item
T

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

index
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.

Applies to

IndexOf(T, Int32, Int32)

Source:
ImmutableList_1.Builder.cs
Source:
ImmutableList_1.Builder.cs
Source:
ImmutableList_1.Builder.cs

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 starts at the specified index and contains the specified number of elements.

public:
 int IndexOf(T item, int index, int count);
public int IndexOf (T item, int index, int count);
member this.IndexOf : 'T * int * int -> int
Public Function IndexOf (item As T, index As Integer, count As Integer) As Integer

Parameters

item
T

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

index
Int32

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

count
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 starts at index and contains count number of elements, if found; otherwise, -1.

Applies to

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

Source:
ImmutableList_1.Builder.cs
Source:
ImmutableList_1.Builder.cs
Source:
ImmutableList_1.Builder.cs

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the ImmutableList<T>.Builder that starts at the specified index and contains the specified number of elements.

public:
 int IndexOf(T item, int index, int count, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public int IndexOf (T item, int index, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public int IndexOf (T item, int index, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
member this.IndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> int
Public Function IndexOf (item As T, index As Integer, count As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer

Parameters

item
T

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

index
Int32

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

count
Int32

The number of elements to search.

equalityComparer
IEqualityComparer<T>

The value comparer to use for comparing elements for equality.

Returns

The zero-based index of the first occurrence of item within the range of elements in the immutable list that starts at index and contains count number of elements, if found; otherwise, -1

Applies to