Property Hash Table Class

Contract

Get the current value of the Contract property. The Contract property specifies whether the hash table should be automatically contracted when a fraction of its allocated space is used.

Signature (Visual Basic / VBA)

Public Property Get Contract( _
    ) As Boolean

Code Examples

    Assuming
       Dim htTemp As New HashTable
       Dim bContract As Boolean
    for example
       bContract = htTemp.Contract
    leaves
       bContract = True
    Assuming
       Dim htTemp As New HashTable
    for example
       htTemp.Contract = False
Public Property Let Contract( _
    ByVal vContract As Boolean _
    )

Notes & Version History

Details Set the current value of the Contract property.
vContract Set to True to have the hash table automatically contract when a fraction of its allocated space is used. Set to False to have the hash table keep all of its allocated space even if only a fraction of it is used.
Note If you would like to improve the performance of the Hash Table class when creating a very large hash table, you should set the Contract property to False, then call the Resize method to create enough "buckets" in order to store the number of Keys & Items you will be placing in the hash table. This will avoid the automatic expansion of the hash table which may take some time.