- name
- A string containing the key of the entry to locate.
A string that contains the comma-separated list of values associated with the specified key. If name is not contained in the current instance, attempting to get it returns null, and attempting to set it creates a new entry using name .
Type Reason ArgumentOutOfRangeException index is outside the valid range of indexes for the collection. NotSupportedException The property is being set and the current instance is read-only.
If the specified key already exists in the collection, setting this property overwrites the existing values with the specified value. (If the existing value contains a string of multiple comma-delimited values, the complete string is replaced with a single instance of the specified value.) If the specified key does not exist in the collection, setting this property creates a new entry using the specified key and the specified value.
This property provides the ability to access a specific element in the current instance using the following notation: myCollection[key] .
To add the new value to the existing list of values, use the NameValueCollection.Add(NameValueCollection) method.