Networking System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.x.x 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Collections.Specialized.NameObjectCollectionBase

This collection is based on the class. However, unlike the , this class stores multiple string values under a single key.

This class can be used for headers, query strings and form data.

Each element is a key/value pair.

Collections of this type do not preserve the ordering of element, and no particular ordering is guaranteed when enumerating the collection.

The capacity of a is the number of elements the can hold. As elements are added to a , the capacity is automatically increased as required through reallocation.

The hash code provider dispenses hash codes for keys in the . The default hash code provider is the .

The comparer determines whether two keys are equal. The default comparer is the .

In .NET Framework version 1.0, this class uses culture-sensitive string comparisons. However, in .NET Framework version 1.1 and later, this class uses when comparing strings. For more information about how culture affects comparisons and sorting, see Comparing and Sorting Data for a Specific Culture and Performing Culture-Insensitive String Operations.

null is allowed as a key or as a value.

The method does not distinguish between null which is returned because the specified key is not found and null which is returned because the value associated with the key is null.

Represents a collection of associated keys and values that can be accessed either with the key or with the index.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The capacity of a is the number of elements that the can hold. As elements are added to a , the capacity is automatically increased as required by reallocating the internal array.

  If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the .

  The hash code provider dispenses hash codes for keys in the . The default hash code provider is the .

  The comparer determines whether two keys are equal. The default comparer is the .

  This constructor is an O(1) operation.

  Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.

  0
- Constructor
  2.0.0.0
  4.0.0.0

  The capacity of a object is the number of elements that the can hold. As elements are added to a , the capacity is automatically increased as required by reallocating the internal array.

  If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the .

  The object combines the comparer and the hash code provider. The hash code provider dispenses hash codes for keys in the . The comparer determines whether two keys are equal.

  This constructor is an O(1) operation.

  Initializes a new instance of the class that is empty, has the default initial capacity, and uses the specified object.

  The object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  is .

  The capacity of a is the number of elements that the can hold. As elements are added to a , the capacity is automatically increased as required by reallocating the internal array.

  If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the .

  The hash code provider dispenses hash codes for keys in the . The default hash code provider is the .

  The comparer determines whether two keys are equal. The default comparer is the .

  The elements of the new are sorted in the same order as the source .

  This constructor is an O() operation, where is the number of elements in .

  Copies the entries from the specified to a new with the same initial capacity as the number of entries copied and using the same hash code provider and the same comparer as the source collection.

  The to copy to the new instance.
  0
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  < 0.

  The capacity of a is the number of elements that the can hold. As elements are added to a , the capacity is automatically increased as required by reallocating the internal array.

  If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the .

  The hash code provider dispenses hash codes for keys in the . The default hash code provider is the .

  The comparer determines whether two keys are equal. The default comparer is the .

  This constructor is an O() operation, where is .

  Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.

  The initial number of entries that the can contain.
  0
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use NameValueCollection (IEqualityComparer)")

  The capacity of a is the number of elements that the can hold. As elements are added to a , the capacity is automatically increased as required by reallocating the internal array.

  If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the .

  The hash code provider dispenses hash codes for keys in the . The default hash code provider is the .

  The comparer determines whether two keys are equal. The default comparer is the .

  This constructor is an O(1) operation.

  Initializes a new instance of the class that is empty, has the default initial capacity and uses the specified hash code provider and the specified comparer.

  The that will supply the hash codes for all keys in the .
  The to use to determine whether two keys are equal.
  0
- Constructor
  2.0.0.0
  4.0.0.0

  The capacity of a object is the number of elements that the can hold. As elements are added to a , the capacity is automatically increased as required by reallocating the internal array.

  If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the .

  The object combines the comparer and the hash code provider. The hash code provider dispenses hash codes for keys in the . The comparer determines whether two keys are equal.

  This constructor is an O() operation, where is the parameter.

  Initializes a new instance of the class that is empty, has the specified initial capacity, and uses the specified object.

  The initial number of entries that the object can contain.
  The object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  is .
  is < 0.

  The capacity of a is the number of elements that the can hold. As elements are added to a , the capacity is automatically increased as required by reallocating the internal array.

  If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the .

  The hash code provider dispenses hash codes for keys in the . The default hash code provider is the .

  The comparer determines whether two keys are equal. The default comparer is the .

  This constructor is an O() operation, where is . If the number of elements in is greater than , this constructor becomes an O( + ) operation, where is and is the number of elements in .

  Copies the entries from the specified to a new with the specified initial capacity or the same initial capacity as the number of entries copied, whichever is greater, and using the default case-insensitive hash code provider and the default case-insensitive comparer.

  The initial number of entries that the can contain.
  The to copy to the new instance.
  0
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor is an O(1) operation.

  Initializes a new instance of the class that is serializable and uses the specified and .

  A object that contains the information required to serialize the new instance.
  A object that contains the source and destination of the serialized stream associated with the new instance.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use NameValueCollection (IEqualityComparer)")
  < 0.

  The capacity of a is the number of elements that the can hold. As elements are added to a , the capacity is automatically increased as required by reallocating the internal array.

  If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the .

  The hash code provider dispenses hash codes for keys in the . The default hash code provider is the .

  The comparer determines whether two keys are equal. The default comparer is the .

  This constructor is an O() operation, where is .

  Initializes a new instance of the class that is empty, has the specified initial capacity and uses the specified hash code provider and the specified comparer.

  The initial number of entries that the can contain.
  The that will supply the hash codes for all keys in the .
  The to use to determine whether two keys are equal.
  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` The current instance is read-only. is .

  If a key in already exists in the target instance, the associated value in is added to the existing comma-separated list of values associated with the same key in the target instance.

  If already equals the capacity, the capacity of the 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 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() operation, where is .

  Copies the entries in the specified to the current .

  The to copy to the current . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` The current instance is read-only.

  If the specified key already exists in the target instance, the specified value is added to the existing comma-separated list of values in the form "value1,value2,value3". The values are associated with the same key in the target instance.

  If already equals the capacity, the capacity of the 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 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() operation, where is .

  Adds an entry with the specified name and value to the .

  The key of the entry to add. The key can be null. The value of the entry to add. The value can be null. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[]

  A array containing all the keys of the current instance. If the current instance is empty, the value of this property is an empty array.

  If the collection is empty, this method returns an empty array, not null.

  The arrays returned by are cached for better performance and are automatically refreshed when the collection changes. A derived class can invalidate the cached version by calling , thereby forcing the arrays to be recreated.

  This method is an O() operation, where is .

  Gets all the keys in the .

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void The current instance is read-only.

  This method is an O(1) operation.

  Invalidates the cached arrays and removes all entries from the .

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` is . < 0.

  has more than one dimension.

  -or-

  >= .Length.

  -or-

  The number of elements in the current instance is greater than the available space from to the end of the destination .

  At least one element in the current instance is not assignment-compatible with the type of .

  The specified array must be of a compatible type.

  This method uses to copy the elements.

  This method is an O() operation, where is .

  Copies the entire to a compatible one-dimensional , starting at the specified index of the target array.

  The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. 0
- Property
  1.0.5000.0
  2.0.0.0
  System.Int32

  Gets the number of elements contained in the current instance.

  A that indicates the number of elements contained in the current instance.

  This property is read-only.

  This property is implemented to support the interface.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String `` is outside the valid range of indices for the current instance.

  This method is an O() operation, where is the number of values at the specified index.

  Gets the values at the specified index of the combined into one comma-separated list.

  A that contains a comma-separated list of the values at the specified index of the , if found; otherwise, null.

  The zero-based index of the entry that contains the values to get from the collection. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  This method returns null in the following cases: 1) if the specified key is not found; and 2) if the specified key is found and its associated value is null. This method does not distinguish between the two cases.

  This method is an O() operation, where is the number of values associated with the specified key.

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

  A that contains a comma-separated list of the values associated with the specified key from the , if found; otherwise, null.

  The key of the entry that contains the values to get. The key can be null. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String `` is outside the valid range of indices for the current instance.

  This method is an O(1) operation.

  Gets the key at the specified index of the .

  A that contains the key at the specified index of the , if found; otherwise, null.

  The zero-based index of the key to get from the collection. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] `` is outside the valid range of indices for the current instance.

  This method is an O() operation, where is the number of values at the specified index.

  Gets the values at the specified index of the .

  A array that contains the values at the specified index of the , if found; otherwise, null.

  The zero-based index of the entry that contains the values to get from the collection. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] ``

  This method returns null in the following cases: 1) if the specified key is not found; and 2) if the specified key is found and its associated value is null. This method does not distinguish between the two cases.

  This method is an O() operation, where is the number of values associated with the specified key.

  Gets the values associated with the specified key from the .

  A array that contains the values associated with the specified key from the , if found; otherwise, null.

  The key of the entry that contains the values to get. The key can be null. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  This method is an O(1) operation.

  Gets a value indicating whether the contains keys that are not null.

  true if the contains keys that are not null; otherwise, false.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  The arrays returned by are cached for better performance and are automatically refreshed when the collection changes. A derived class can invalidate the cached version by calling , thereby forcing the arrays to be recreated.

  This method is an O(1) operation.

  Resets the cached arrays of the collection to null.

  0
- Property
  1.0.5000.0
  2.0.0.0
  System.Boolean Gets or sets a value indicating whether the current instance is read-only. if the current instance is read-only; otherwise, .

  This property is read-write.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  A that specifies the zero-based index of the entry to locate in the current instance.

  Gets the value in the current instance that is associated with the specified index.

  A that contains the comma-separated list of values at the specified index of the current instance.

  This property is read-only.

  This property provides the ability to access a specific element in the collection by using the following syntax: myCollection[index].

  This property cannot be set. To set the value at a specified index, use Item[GetKey(index)].

  is outside the valid range of indices for the current instance. The property is being set and the current instance is read-only. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  A containing the key of the entry to locate.

  Gets or sets the value in the current instance that is associated with the specified key.

  A that contains the comma-separated list of values associated with the specified key. If is not contained in the current instance, attempting to get it returns , and attempting to set it creates a new entry using .

  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 method.

  is outside the valid range of indexes for the collection. The property is being set and the current instance is read-only. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  The current instance is read-only.

  If the does not contain an element with the specified key, the remains unchanged. No exception is thrown.

  In collections of contiguous elements, such as lists, the elements that follow the removed element move up to occupy the vacated spot. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hash table.

  This method is an O() operation, where is .

  Removes the entries with the specified key from the instance.

  The key of the entry to remove. The key can be null. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` The current instance is read-only.

  If the specified key already exists in the collection, this method overwrites the existing list of values with the specified value. To append the new value to the existing list of values, use the method.

  If the specified key does not exist in the collection, this method creates a new entry using the specified key and the specified value.

  This method is an O(1) operation.

  Sets the value of an entry in the .

  The key of the entry to add the new value to. The key can be null. The that represents the new value to add to the specified entry. The value can be null. 0
0