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)
参数类型描述
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)
参数类型描述
startIndexint搜索开始的索引。
matchSystem::Predicate<T>用于检查元素的 Predicate

ReturnValue

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

另见

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

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

int System::Collections::Generic::List<T>::FindIndex(System::Predicate<T> match)
参数类型描述
matchSystem::Predicate<T>用于检查元素的 Predicate

ReturnValue

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

另见