NameValueCollection.Add Method (String, String)
Assembly: System (in system.dll)
'Declaration Public Overridable Sub Add ( _ name As String, _ value As String _ ) 'Usage Dim instance As NameValueCollection Dim name As String Dim value As String instance.Add(name, value)
The String key of the entry to add. The key can be a null reference (Nothing in Visual Basic).
The String value of the entry to add. The value can be a null reference (Nothing in Visual Basic).
If the specified key already exists in the target NameValueCollection instance, the specified value is added to the existing comma-separated list of values associated with the same key in the target NameValueCollection instance.
If Count already equals the capacity, the capacity of the NameValueCollection is increased by automatically reallocating the internal array, and the existing elements are copied to the new array before the new element is added.
If Count is less than the capacity, this method is an O(1) operation. If the capacity needs to be increased to accommodate the new element, this method becomes an O(n) operation, where n is Count.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.