ConcurrentQueue<T>.Count ConcurrentQueue<T>.Count ConcurrentQueue<T>.Count ConcurrentQueue<T>.Count Property

定義

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

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

屬性值

ConcurrentQueue<T> 中所包含的項目數。The number of elements contained in the ConcurrentQueue<T>.

實作

備註

若要判斷集合是否包含任何專案, 建議使用IsEmpty屬性, 而不是Count從屬性中抓取專案數, 並將其與0進行比較。For determining whether the collection contains any items, use of the IsEmpty property is recommended rather than retrieving the number of items from the Count property and comparing it to 0.

適用於

另請參閱