System::Collections::Generic::List::FindIndex 方法

List::FindIndex(int, int, System::Predicate<T>) method

查找符合特定谓词的元素。

int System::Collections::Generic::List<T>::FindIndex(int startIndex, int count, System::Predicate<T> match)
ParameterType描述
startIndexint开始搜索的索引。
countint要遍历的元素数量。
matchSystem::Predicate<T>Predicate 用于检查元素。

ReturnValue

匹配元素的索引,若未找到则为 -1。

另见

List::FindIndex(int, System::Predicate<T>) method

查找符合特定谓词的元素。

int System::Collections::Generic::List<T>::FindIndex(int startIndex, System::Predicate<T> match)
ParameterType描述
startIndexint开始搜索的索引。
matchSystem::Predicate<T>Predicate 用于检查元素。

ReturnValue

匹配元素的索引,若未找到则为 -1。

另见

List::FindIndex(System::Predicate<T>) method

查找符合特定谓词的元素。

int System::Collections::Generic::List<T>::FindIndex(System::Predicate<T> match)
ParameterType描述
matchSystem::Predicate<T>Predicate 用于检查元素。

ReturnValue

匹配元素的索引,若未找到则为 -1。

另见