ConcurrentDictionary(TKey, TValue) Constructor (IEqualityComparer(TKey))
From Task Parallel System.Threading
|
|
| .NET Framework Class Library |
| ConcurrentDictionary<(Of <(TKey, TValue>)>) Constructor (IEqualityComparer<(Of <(TKey>)>)) |
| ConcurrentDictionary<(Of <(TKey, TValue>)>) Class See Also Send Feedback |
Initializes a new instance of the ConcurrentDictionary<(Of <(TKey, TValue>)>)
class that is empty, has the specified concurrency level and capacity, and uses the specified
IEqualityComparer<(Of <(TKey>)>).
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Sub New ( _ comparer As IEqualityComparer(Of TKey) _ ) |
| C# |
|---|
public ConcurrentDictionary( IEqualityComparer<TKey> comparer ) |
Parameters
- comparer
- Type: System.Collections.Generic..::.IEqualityComparer<(Of <(TKey>)>)
The IEqualityComparer<(Of <(TKey>)>) implementation to use when comparing keys.
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | comparer is a null reference (Nothing in Visual Basic). |