NameValueCollection Class

This class provides a means for specifying a series of string name/string value pairs, which are used by the WebClient class’s QueryString property. This series is preceded, in the Uri string, by a question mark (?). The name/value pairs are separated from one another, within the Uri string, by an ampersand (&).

Namespace: elsystem.net

Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property AllKeys vector Gets a vector that contains all of the keys in the NameValueCollection.
Public property Count int Gets the number of string name/value pairs in the collection.
Public property Items(Idx) string Gets the string at the specified string index Idx in the collection.
Public property Items(Idx) int Gets the string at the specified integer index Idx in the collection.
Methods
  Name Description
Public property Add(name,value) Adds a name/value pair to the collection.
Public property Clear() Removes all items from the collection.
Public property Get(name) Gets the value associated with the specified key name. Returns the values as a comma-separated list.
Public property Remove(name) Removes the string with the specified key name from the collection.
Public property Set(name,value) Sets string name to the specified string value. Adds the item if it does not exist; otherwise updates the value. Either or both string parameters may be NULL.
Public property ToString() Returns a string representation of the NameValueCollection object.