語言

ParallelEnumerable.LongCount 方法

定義

會傳回 Int64,代表平行序列中的項目總數。

多載

名稱 Description
LongCount<TSource>(ParallelQuery<TSource>)

會傳回 Int64,代表平行序列中的項目總數。

LongCount<TSource>(ParallelQuery<TSource>, Func<TSource,Boolean>)

會傳回 Int64,代表平行序列中滿足條件的元素數目。

LongCount<TSource>(ParallelQuery<TSource>)

來源:
ParallelEnumerable.cs
來源:
ParallelEnumerable.cs
來源:
ParallelEnumerable.cs
來源:
ParallelEnumerable.cs
來源:
ParallelEnumerable.cs

會傳回 Int64,代表平行序列中的項目總數。

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static long LongCount(System::Linq::ParallelQuery<TSource> ^ source);
public static long LongCount<TSource>(this System.Linq.ParallelQuery<TSource> source);
static member LongCount : System.Linq.ParallelQuery<'Source> -> int64
<Extension()>
Public Function LongCount(Of TSource) (source As ParallelQuery(Of TSource)) As Long

類型參數

TSource

元素 source的類型。

參數

source
ParallelQuery<TSource>

包含待計數元素的序列。

傳回

輸入序列中的元素數量。

例外狀況

source 是空參考(Visual Basic 中無任何參考)。

原始碼中的元素數量比 Int32.MaxValue 還多。 -或- 在查詢評估過程中發生了一個或多個例外。

計算結果大於 Int32.MaxValue。

另請參閱

適用於

LongCount<TSource>(ParallelQuery<TSource>, Func<TSource,Boolean>)

來源:
ParallelEnumerable.cs
來源:
ParallelEnumerable.cs
來源:
ParallelEnumerable.cs
來源:
ParallelEnumerable.cs
來源:
ParallelEnumerable.cs

會傳回 Int64,代表平行序列中滿足條件的元素數目。

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static long LongCount(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, bool> ^ predicate);
public static long LongCount<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,bool> predicate);
static member LongCount : System.Linq.ParallelQuery<'Source> * Func<'Source, bool> -> int64
<Extension()>
Public Function LongCount(Of TSource) (source As ParallelQuery(Of TSource), predicate As Func(Of TSource, Boolean)) As Long

類型參數

TSource

元素 source的類型。

參數

source
ParallelQuery<TSource>

包含待計數元素的序列。

predicate
Func<TSource,Boolean>

一個用來測試每個元素條件的函數。

傳回

一個數字,代表序列中有多少元素滿足謂詞函數的條件。

例外狀況

source 或 predicate 是空參考(Nothing in Visual Basic)。

原始碼中的元素數量比 Int32.MaxValue 還多。 -或- 在查詢評估過程中發生了一個或多個例外。

計算結果大於 Int32.MaxValue。

另請參閱

適用於