System.Collections.Specialized.NameValueCollection: Method Members

The methods of System.Collections.Specialized.NameValueCollection are listed below. For a list of all members, see the NameValueCollection Members list.

See Also: Inherited members from System.Collections.Specialized.NameObjectCollectionBase

Public Methods

Add(NameValueCollection)

Copies the entries in the specified System.Collections.Specialized.NameValueCollection to the current System.Collections.Specialized.NameValueCollection.

Add(string, string)

Adds an entry with the specified name and value to the System.Collections.Specialized.NameValueCollection.

Clear()

Invalidates the cached arrays and removes all entries from the System.Collections.Specialized.NameValueCollection.

CopyTo(Array, int)

Copies the entire System.Collections.Specialized.NameValueCollection to a compatible one-dimensional Array, starting at the specified index of the target array.

Get(int) : string

Gets the values at the specified index of the System.Collections.Specialized.NameValueCollection combined into one comma-separated list.

Get(string) : string

Gets the values associated with the specified key from the System.Collections.Specialized.NameValueCollection combined into one comma-separated list.

GetKey(int) : string

Gets the key at the specified index of the System.Collections.Specialized.NameValueCollection.

GetValues(int) : string[]

Gets the values at the specified index of the System.Collections.Specialized.NameValueCollection.

GetValues(string) : string[]

Gets the values associated with the specified key from the System.Collections.Specialized.NameValueCollection.

HasKeys() : bool

Gets a value indicating whether the System.Collections.Specialized.NameValueCollection contains keys that are not null.

Remove(string)

Removes the entries with the specified key from the System.Collections.Specialized.NameObjectCollectionBase instance.

Set(string, string)

Sets the value of an entry in the System.Collections.Specialized.NameValueCollection.

Protected Methods

InvalidateCachedArrays()

Resets the cached arrays of the collection to null.