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

屬性值

Int32

BlockingCollection<T> 中所含的項目數。

實作

例外狀況

備註

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

適用於

另請參閱