Mono Class Library: System.Collections.Specialized.NameValueCollection Overview | MembersSystem.Collections.Specialized.NameValueCollection.Item Property |
Gets or sets the value in the current instance that is associated with the specified key. [Edit]
|
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 . [Edit]
Type Reason ArgumentOutOfRangeException index is outside the valid range of indexes for the collection. [Edit] NotSupportedException The property is being set and the current instance is read-only. [Edit]
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.
Note:[Edit]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.
Namespace: System.Collections.Specialized
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0