System::Collections::Generic::IEnumerable::LINQ_Count method

IEnumerable::LINQ_Count() method

返回序列中元素的数量(通过直接计数计算)。

int System::Collections::Generic::IEnumerable<T>::LINQ_Count()

ReturnValue

序列中元素的数量。

另见

IEnumerable::LINQ_Count(const Func<T, bool>&) method

返回满足指定条件的序列中元素的数量。

int System::Collections::Generic::IEnumerable<T>::LINQ_Count(const Func<T, bool> &predicate)
参数类型描述
谓词const Func<T, bool>&用于测试每个元素是否满足条件的函数。

ReturnValue

满足指定条件的序列中元素的数量。

另见