This documentation is archived and is not being maintained.

NameValueCollection Constructor

.NET Framework 1.1

Initializes a new instance of the NameValueCollection class.

Overload List

Initializes a new instance of the NameValueCollection class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.

Supported by the .NET Compact Framework.

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

Initializes a new instance of the NameValueCollection class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.

Supported by the .NET Compact Framework.

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

Copies the entries from the specified NameValueCollection to a new NameValueCollection with the same initial capacity as the number of entries copied and using the same hash code provider and the same comparer as the source collection.

Supported by the .NET Compact Framework.

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

Initializes a new instance of the NameValueCollection class that is empty, has the default initial capacity and uses the specified hash code provider and the specified comparer.

Supported by the .NET Compact Framework.

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

Copies the entries from the specified NameValueCollection to a new NameValueCollection with the specified initial capacity or the same initial capacity as the number of entries copied, whichever is greater, and using the default case-insensitive hash code provider and the default case-insensitive comparer.

Supported by the .NET Compact Framework.

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

Initializes a new instance of the NameValueCollection class that is serializable and uses the specified System.Runtime.Serialization.SerializationInfo and System.Runtime.Serialization.StreamingContext.

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

Initializes a new instance of the NameValueCollection class that is empty, has the specified initial capacity and uses 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 NameValueCollection(int, IHashCodeProvider, IComparer);
[C++] public: NameValueCollection(int, IHashCodeProvider*, IComparer*);
[JScript] public function NameValueCollection(int, IHashCodeProvider, IComparer);

See Also

NameValueCollection Class | NameValueCollection Members | System.Collections.Specialized Namespace

Show: