Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ConcurrentDictionary(TKey, TValue) Constructor (Int32, Int32)

ConcurrentDictionary(Of TKey, TValue) Constructor (Int32, Int32)

.NET Framework 4.6 and 4.5

Initializes a new instance of the ConcurrentDictionary(Of TKey, TValue) class that is empty, has the specified concurrency level and capacity, and uses the default comparer for the key type.

Namespace:  System.Collections.Concurrent
Assemblies:   mscorlib (in mscorlib.dll)
  System.Collections.Concurrent (in System.Collections.Concurrent.dll)

Public Sub New ( _
	concurrencyLevel As Integer, _
	capacity As Integer _


Type: System.Int32

The estimated number of threads that will update the ConcurrentDictionary(Of TKey, TValue) concurrently.

Type: System.Int32

The initial number of elements that the ConcurrentDictionary(Of TKey, TValue) can contain.


concurrencyLevel is less than 1.


capacity is less than 0.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

.NET for Windows Phone apps

Supported in: Windows Phone 8.1

Portable Class Library

Supported in: Portable Class Library
© 2015 Microsoft