ImmutableList<T>.Builder.FindIndex 方法

定义

重载

名称 说明
FindIndex(Int32, Predicate<T>)

搜索与指定谓词定义的条件匹配的元素,并在不可变列表中从指定索引扩展到最后一个元素的元素范围内返回第一个匹配项的从零开始的索引。

FindIndex(Int32, Int32, Predicate<T>)

搜索与指定谓词定义的条件匹配的元素,并返回从指定索引开始且包含指定数量的元素的不可变列表中第一个匹配项的从零开始的索引。

FindIndex(Predicate<T>)

搜索与指定谓词定义的条件匹配的元素,并返回整个不可变列表中第一个匹配项的从零开始的索引。

FindIndex(Int32, Predicate<T>)

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

搜索与指定谓词定义的条件匹配的元素,并在不可变列表中从指定索引扩展到最后一个元素的元素范围内返回第一个匹配项的从零开始的索引。

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

参数

startIndex
Int32

从零开始的搜索索引。

match
Predicate<T>

定义要搜索的元素条件的委托。

返回

如果找到,则为第一个匹配条件的元素 match的第一个匹配项的从零开始的索引;否则为 -1。

适用于

FindIndex(Int32, Int32, Predicate<T>)

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

搜索与指定谓词定义的条件匹配的元素,并返回从指定索引开始且包含指定数量的元素的不可变列表中第一个匹配项的从零开始的索引。

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

参数

startIndex
Int32

从零开始的搜索索引。

count
Int32

要搜索的节中的元素数。

match
Predicate<T>

定义要搜索的元素条件的委托。

返回

如果找到,则为第一个匹配条件的元素 match的第一个匹配项的从零开始的索引;否则为 -1。

适用于

FindIndex(Predicate<T>)

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

搜索与指定谓词定义的条件匹配的元素,并返回整个不可变列表中第一个匹配项的从零开始的索引。

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

参数

match
Predicate<T>

定义要搜索的元素条件的委托。

返回

如果找到,则为第一个匹配条件的元素 match的第一个匹配项的从零开始的索引;否则为 -1。

适用于