語言

BlockingCollection<T>.Count 屬性

定義

得到 中所包含 BlockingCollection<T>的項目數量。

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

屬性值

包含於 BlockingCollection<T>的項目數量。

實作

例外狀況

這些 BlockingCollection<T> 已經被處理掉了。

備註

如果 BlockingCollection 中的任何方法在存取 Count 屬性時仍在執行,則回傳值為近似值。 計數可能反映的數量大於或小於 BlockingCollection 中實際項目數量。

適用於

另請參閱