BlockingCollection<T>.Count 屬性

定義

取得 BlockingCollection<T> 中所含的項目數。Gets the number of items contained in the BlockingCollection<T>.

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

屬性值

BlockingCollection<T> 中所含的項目數。The number of items contained in the BlockingCollection<T>.

實作

例外狀況

備註

如果 BlockingCollection 中的任何方法在存取 Count 屬性時執行,則傳回值為近似值。If any method in BlockingCollection is executing while the Count property is being accessed, the return value is approximate. 計數可能會反映大於或小於 BlockingCollection 中實際專案數的數位。Count may reflect a number that is either greater than or less than the actual number of items in the BlockingCollection.

適用於

另請參閱