This documentation is archived and is not being maintained.

Hashtable Constructor

.NET Framework 1.1

Initializes a new instance of the Hashtable class.

Overload List

Creates an empty Hashtable with the default initial capacity and using the default load factor, the default hash code provider and the default comparer.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New()
[C#] public Hashtable();
[C++] public: Hashtable();
[JScript] public function Hashtable();

Copies the elements from the specified dictionary to a new Hashtable with the same initial capacity as the number of elements copied and using the default load factor, the default hash code provider and the default comparer.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(IDictionary)
[C#] public Hashtable(IDictionary);
[C++] public: Hashtable(IDictionary*);
[JScript] public function Hashtable(IDictionary);

Creates an empty Hashtable with the specified initial capacity and using the default load factor, the default hash code provider and the default comparer.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(Integer)
[C#] public Hashtable(int);
[C++] public: Hashtable(int);
[JScript] public function Hashtable(int);

Copies the elements from the specified dictionary to a new Hashtable with the same initial capacity as the number of elements copied and using the specified load factor, the default hash code provider and the default comparer.

[Visual Basic] Public Sub New(IDictionary, Single)
[C#] public Hashtable(IDictionary, float);
[C++] public: Hashtable(IDictionary*, float);
[JScript] public function Hashtable(IDictionary, float);

Creates an empty Hashtable with the default initial capacity and using the default load factor, the specified hash code provider and the specified comparer.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(IHashCodeProvider, IComparer)
[C#] public Hashtable(IHashCodeProvider, IComparer);
[C++] public: Hashtable(IHashCodeProvider*, IComparer*);
[JScript] public function Hashtable(IHashCodeProvider, IComparer);

Creates an empty Hashtable with the specified initial capacity and using the specified load factor, the default hash code provider and the default comparer.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(Integer, Single)
[C#] public Hashtable(int, float);
[C++] public: Hashtable(int, float);
[JScript] public function Hashtable(int, float);

Creates an empty Hashtable that is serializable with the specified SerializationInfo and StreamingContext.

[Visual Basic] Protected Sub New(SerializationInfo, StreamingContext)
[C#] protected Hashtable(SerializationInfo, StreamingContext);
[C++] protected: Hashtable(SerializationInfo*, StreamingContext);
[JScript] protected function Hashtable(SerializationInfo, StreamingContext);

Copies the elements from the specified dictionary to a new Hashtable with the same initial capacity as the number of elements copied and using the default load factor, the specified hash code provider and the specified comparer.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(IDictionary, IHashCodeProvider, IComparer)
[C#] public Hashtable(IDictionary, IHashCodeProvider, IComparer);
[C++] public: Hashtable(IDictionary*, IHashCodeProvider*, IComparer*);
[JScript] public function Hashtable(IDictionary, IHashCodeProvider, IComparer);

Creates an empty Hashtable with the specified initial capacity and using the default load factor, the specified hash code provider and the specified comparer.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(Integer, IHashCodeProvider, IComparer)
[C#] public Hashtable(int, IHashCodeProvider, IComparer);
[C++] public: Hashtable(int, IHashCodeProvider*, IComparer*);
[JScript] public function Hashtable(int, IHashCodeProvider, IComparer);

Copies the elements from the specified dictionary to a new Hashtable with the same initial capacity as the number of elements copied and using the specified load factor, the specified hash code provider and the specified comparer.

[Visual Basic] Public Sub New(IDictionary, Single, IHashCodeProvider, IComparer)
[C#] public Hashtable(IDictionary, float, IHashCodeProvider, IComparer);
[C++] public: Hashtable(IDictionary*, float, IHashCodeProvider*, IComparer*);
[JScript] public function Hashtable(IDictionary, float, IHashCodeProvider, IComparer);

Creates an empty Hashtable with the specified initial capacity and using the specified load factor, the specified hash code provider and the specified comparer.

[Visual Basic] Public Sub New(Integer, Single, IHashCodeProvider, IComparer)
[C#] public Hashtable(int, float, IHashCodeProvider, IComparer);
[C++] public: Hashtable(int, float, IHashCodeProvider*, IComparer*);
[JScript] public function Hashtable(int, float, IHashCodeProvider, IComparer);

See Also

Hashtable Class | Hashtable Members | System.Collections Namespace

Show: