ConcurrentDictionary<TKey,TValue>.Count ConcurrentDictionary<TKey,TValue>.Count ConcurrentDictionary<TKey,TValue>.Count ConcurrentDictionary<TKey,TValue>.Count Property

定义

获取包含在 ConcurrentDictionary<TKey,TValue> 中的键/值对的数目。 Gets the number of key/value pairs contained in the ConcurrentDictionary<TKey,TValue>.

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

包含在 ConcurrentDictionary<TKey,TValue> 中的键/值对的数目。 The number of key/value pairs contained in the ConcurrentDictionary<TKey,TValue>.

实现
异常

字典中已包含元素的最大数量(MaxValue)。 The dictionary already contains the maximum number of elements (MaxValue).

注解

此属性具有快照语义,表示中的项数System.Collections.Concurrent.ConcurrentDictionary<TKey,TValue>时刻访问了属性。This property has snapshot semantics and represents the number of items in the System.Collections.Concurrent.ConcurrentDictionary<TKey,TValue> at the moment when the property was accessed.

适用于

另请参阅