Partager via


Hashtable Members

The following tables list the members exposed by the Hashtable type.

Public Constructors

Name Description
Public Method Hashtable Overloaded. Initializes a new, empty instance of the Hashtable class.

Public Properties

Name Description
Public Property Count Gets the number of key/value pairs in the Hashtable.
Public Property GrowthFactor Gets or sets the multiplier to use to increase the Hashtable size during a rehash.
Public Property IsFixedSize Gets a value indicating whether the Hashtable has a fixed size.
Public Property IsReadOnly Gets a value indicating whether the Hashtable is read-only.
Public Property IsSynchronized Gets a value indicating whether the Hashtable is synchronized (thread safe).
Public Property Item Gets or sets the value associated with the specified key.
Public Property Keys Gets an ICollection that contains the keys in the Hashtable.
Public Property MaxLoadFactor Gets or sets the load factor that results in a rehash with a greater number of buckets.
Public Property SyncRoot Gets an object that can be used to synchronize access to the Hashtable.
Public Property Values Gets an ICollection containing the values in the Hashtable.

Public Methods

Name Description
Public Method Add Adds an element that has the specified key and value into the Hashtable.
Public Method Clear Removes all objects from the Hashtable.
Public Method Clone Creates a shallow copy of the Hashtable.
Public Method Contains Determines whether an element is in the Hashtable.
Public Method CopyTo Copies the Hashtable elements to an existing one-dimensional Array starting at the specified array index.
Public Method Equals (Inherited from Object.)
Public Method GetEnumerator Returns an enumerator that iterates through the Hashtable.
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method ReferenceEquals (Inherited from Object.)
Public Method Remove Removes the element that has the specified key from the Hashtable.
Public Method ToString (Inherited from Object.)

Protected Methods

Name Description
Protected Method Finalize (Inherited from Object.)
Protected Method MemberwiseClone (Inherited from Object.)

See Also

Reference

Hashtable Class
System.Collections Namespace