|
| .NET Framework Class Library |
| ConcurrentDictionary<(Of <(TKey, TValue>)>)..::.Count Property |
| ConcurrentDictionary<(Of <(TKey, TValue>)>) Class See Also Send Feedback |
Gets the number of key/value pairs contained in the ConcurrentDictionary<(Of <(TKey, TValue>)>).
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public ReadOnly Property Count As Integer |
| C# |
|---|
public int Count { get; } |
Field Value
The number of key/value paris contained in the ConcurrentDictionary<(Of <(TKey, TValue>)>).Implements
ICollection<(Of <(T>)>)..::.CountICollection..::.Count
Remarks
Count has snapshot semantics and represents the number of items in the ConcurrentDictionary<(Of <(TKey, TValue>)>)
at the moment when Count was accessed.
Exceptions
| Exception | Condition |
|---|---|
| System..::.OverflowException | The dictionary contains too many elements. |