ConcurrentBag<T>.Count 属性

定义

获取包含在 . 中的 ConcurrentBag<T>元素数。

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

属性值

中包含的 ConcurrentBag<T>元素数。

实现

注解

返回的计数表示包内容的时刻快照。 访问属性后 Count ,其他线程可能会立即添加或删除项。

适用于

另请参阅