Mono Class Library: System.Collections.Specialized.NameValueCollection Overview | Members

System.Collections.Specialized.NameValueCollection.Add Method

Adds an entry with the specified key and value to the current instance. [Edit]

public virtual void Add (string name, string val)

Parameters

name
A string that represents the key of the entry to add. Can be null . [Edit]
val
Documentation for this section has not yet been entered. [Edit]

Exceptions

TypeReason
NotSupportedExceptionThe current instance is read-only. [Edit]

Remarks

Operation
As described above.

If the specified key already exists in the current instance, the specified value is added to the existing comma-separated list of values associated with the same key.

Attempting to assign the same value to an existing key adds a new value to that key, thus providing two (or more) copies of the same value associated with the key.

Note to Inheritors
Override this method to customize the default behavior in a type derived from the current type.

Usage
Use this method to add an entry to the current instance.

[Edit]

Requirements

Namespace: System.Collections.Specialized
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0