Share via


Hashtable Constructor (Int32, Int32)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Initializes a new, empty instance of the Hashtable class using the specified initial capacity and maximum load factor.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Sub New ( _
    capacity As Integer, _
    maxLoadFactor As Integer _
)
public Hashtable(
    int capacity,
    int maxLoadFactor
)
public:
Hashtable(
    int capacity, 
    int maxLoadFactor
)
new : 
        capacity:int * 
        maxLoadFactor:int -> Hashtable
public function Hashtable(
    capacity : int, 
    maxLoadFactor : int
)

Parameters

Remarks

The load factor is the maximum ratio of elements to buckets. A smaller load factor means faster lookup at the cost of increased memory consumption. The default value is 2. When the actual load factor reaches the maximum load factor, the number of buckets is automatically increased using the value of the GrowthFactor property. The default value is 2.

.NET Framework Security

See Also

Reference

Hashtable Class

Hashtable Overload

System.Collections Namespace