ImmutableList<T>.Builder.FindLastIndex 方法

定义

重载

FindLastIndex(Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回整个不可变列表中最后一个匹配元素的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire immutable list.

FindLastIndex(Int32, Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回不可变列表中从第一个元素到指定索引的元素范围内最后一个匹配项的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index.

FindLastIndex(Int32, Int32, Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回不可变列表中包含指定元素个数、到指定索引结束的元素范围内最后一个匹配项的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index.

FindLastIndex(Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回整个不可变列表中最后一个匹配元素的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire immutable list.

public:
 virtual int FindLastIndex(Predicate<T> ^ match);
public:
 int FindLastIndex(Predicate<T> ^ match);
public int FindLastIndex (Predicate<T> match);
abstract member FindLastIndex : Predicate<'T> -> int
override this.FindLastIndex : Predicate<'T> -> int
member this.FindLastIndex : Predicate<'T> -> int
Public Function FindLastIndex (match As Predicate(Of T)) As Integer

参数

match
Predicate<T>

委托,用于定义要搜索的元素的条件。The delegate that defines the conditions of the element to search for.

返回

Int32

如果找到与 match 定义的条件相匹配的最后一个元素,则为该元素的从零开始的索引;否则为 -1。The zero-based index of the last occurrence of an element that matches the conditions defined by match, if found; otherwise, -1.

适用于

FindLastIndex(Int32, Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回不可变列表中从第一个元素到指定索引的元素范围内最后一个匹配项的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index.

public:
 virtual int FindLastIndex(int startIndex, Predicate<T> ^ match);
public:
 int FindLastIndex(int startIndex, Predicate<T> ^ match);
public int FindLastIndex (int startIndex, Predicate<T> match);
abstract member FindLastIndex : int * Predicate<'T> -> int
override this.FindLastIndex : int * Predicate<'T> -> int
member this.FindLastIndex : int * Predicate<'T> -> int
Public Function FindLastIndex (startIndex As Integer, match As Predicate(Of T)) As Integer

参数

startIndex
Int32

向后搜索的从零开始的起始索引。The zero-based starting index of the backward search.

match
Predicate<T>

委托,用于定义要搜索的元素的条件。The delegate that defines the conditions of the element to search for.

返回

Int32

如果找到与 match 定义的条件相匹配的最后一个元素,则为该元素的从零开始的索引;否则为 -1。The zero-based index of the last occurrence of an element that matches the conditions defined by match, if found; otherwise, -1.

适用于

FindLastIndex(Int32, Int32, Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回不可变列表中包含指定元素个数、到指定索引结束的元素范围内最后一个匹配项的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index.

public:
 virtual int FindLastIndex(int startIndex, int count, Predicate<T> ^ match);
public:
 int FindLastIndex(int startIndex, int count, Predicate<T> ^ match);
public int FindLastIndex (int startIndex, int count, Predicate<T> match);
abstract member FindLastIndex : int * int * Predicate<'T> -> int
override this.FindLastIndex : int * int * Predicate<'T> -> int
member this.FindLastIndex : int * int * Predicate<'T> -> int
Public Function FindLastIndex (startIndex As Integer, count As Integer, match As Predicate(Of T)) As Integer

参数

startIndex
Int32

向后搜索的从零开始的起始索引。The zero-based starting index of the backward search.

count
Int32

要搜索的部分中的元素数。The number of elements in the section to search.

match
Predicate<T>

委托,用于定义要搜索的元素的条件。The delegate that defines the conditions of the element to search for.

返回

Int32

如果找到与 match 定义的条件相匹配的最后一个元素,则为该元素的从零开始的索引;否则为 -1。The zero-based index of the last occurrence of an element that matches the conditions defined by match, if found; otherwise, -1.

适用于