System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.3300.0 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Collections.ICollection System.Runtime.Serialization.IDeserializationCallback System.Runtime.Serialization.ISerializable

The underlying structure for this class is a hash table.

Each element is a key/value pair.

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

Provides the abstract base class for 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 instance. 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.

- 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

  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 instance. 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 hash code provider and the default comparer.

  The approximate number of entries that the instance can initially contain.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use NameObjectCollectionBase(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 instance. 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 instance.
  The to use to determine whether two keys are equal.
- 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 approximate number of entries that the object can initially 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

  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 NameObjectCollectionBase(int,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 instance. 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 approximate number of entries that the instance can initially contain.
  The that will supply the hash codes for all keys in the instance.
  The to use to determine whether two keys are equal.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  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 key and value into the instance.

  The key of the entry to add. The key can be null. The value of the entry to add. The value can be null.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  is set to zero, and references to other objects from elements of the collection are also released.

  This method is an O(1) operation.

  Removes all entries from the instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object ``

  This method is an O(1) operation.

  Gets the value of the entry at the specified index of the instance.

  An that represents the value of the entry at the specified index.

  The zero-based index of the value to get.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object ``

  If the collection contains multiple entries with the specified key, this method returns only the first entry. To get the values of subsequent entries with the same key, use the enumerator to iterate through the collection and compare the keys.

  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(1) operation.

  Gets the value of the first entry with the specified key from the instance.

  An that represents the value of the first entry with the specified key, if found; otherwise, null.

  The key of the entry to get. The key can be null.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[]

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

  Returns a array that contains all the keys in the instance.

  A array that contains all the keys in the instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object[]

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

  Returns an array that contains all the values in the instance.

  An array that contains all the values in the instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object[] ``

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

  Returns an array of the specified type that contains all the values in the instance.

  An array of the specified type that contains all the values in the instance.

  A that represents the type of array to return.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  This method is an O(1) operation.

  Gets the key of the entry at the specified index of the instance.

  A that represents the key of the entry at the specified index.

  The zero-based index of the key to get.
- 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 instance contains entries whose keys are not null.

  true if the instance contains entries whose keys are not null; otherwise, false.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  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 entries to remove. The key can be null.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  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 entry at the specified index of the instance.

  The zero-based index of the entry to remove.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  This method is an O(1) operation.

  Sets the value of the entry at the specified index of the instance.

  The zero-based index of the entry to set. The that represents the new value of the entry to set. The value can be null.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  If the collection contains multiple entries with the specified key, this method sets only the first entry. To set the values of subsequent entries with the same key, use the enumerator to iterate through the collection and compare the keys.

  This method is an O(1) operation.

  Sets the value of the first entry with the specified key in the instance, if found; otherwise, adds an entry with the specified key and value into the instance.

  The key of the entry to set. The key can be null. The that represents the new value of the entry to set. The value can be null.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 To be added: an object of type 'int'

  The capacity is the number of elements that the can store. is the number of elements that are actually in the .

  The capacity is always greater than or equal to . If exceeds the capacity while adding elements, the capacity is automatically increased by reallocating the internal array before copying the old elements and adding the new elements.

  Retrieving the value of this property is an O(1) operation.

  Gets the number of key/value pairs contained in the instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Collections.IEnumerator

  This enumerator returns the keys of the collection as strings.

  The foreach statement of the C# language (for each in Visual Basic) hides the complexity of the enumerators. Therefore, using foreach is recommended, instead of directly manipulating the enumerator.

  Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection.

  Initially, the enumerator is positioned before the first element in the collection. also brings the enumerator back to this position. At this position, is undefined. Therefore, you must call to advance the enumerator to the first element of the collection before reading the value of .

  returns the same object until either or is called. sets to the next element.

  If passes the end of the collection, the enumerator is positioned after the last element in the collection and returns false. When the enumerator is at this position, subsequent calls to also return false. If the last call to returned false, is undefined. To set to the first element of the collection again, you can call followed by .

  An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated and its behavior is undefined.

  The enumerator does not have exclusive access to the collection; therefore, enumerating through a collection is intrinsically not a thread safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.

  This method is an O(1) operation.

  Returns an enumerator that iterates through the .

  An for the instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

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

  Implements the interface and returns the data needed to serialize the instance.

  A object that contains the information required to serialize the instance. A object that contains the source and destination of the serialized stream associated with the instance.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added: an object of type 'bool'

  A collection that is read-only does not allow the addition, removal, or modification of elements after the collection is created.

  A collection that is read-only is simply a collection with a wrapper that prevents modifying the collection; therefore, if changes are made to the underlying collection, the read-only collection reflects those changes.

  Retrieving the value of this property is an O(1) operation.

  Gets or sets a value indicating whether the instance is read-only.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Collections.Specialized.NameObjectCollectionBase+KeysCollection To be added: an object of type 'NameObjectCollectionBase+KeysCollection'

  Retrieving the value of this property is an O(1) operation.

  Gets a instance that contains all the keys in the instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  While the method is not visible to COM clients by default, inheriting the class can expose it and can cause undesirable behavior in COM clients.

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

  Implements the interface and raises the deserialization event when the deserialization is complete.

  The source of the deserialization event.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The specified array must be of a compatible type.

  This method uses to copy the elements.

  While the method is not visible to COM clients by default, inheriting the class can expose it and can cause undesirable behavior in COM clients.

  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.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  A object is not synchronized. Derived classes can provide a synchronized version of the using the property.

  Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.

  The following code example shows how to lock the collection using the property during the entire enumeration.

  code reference: System.Collections.Specialized.NameObjectCollectionBase#2

  Retrieving the value of this property is an O(1) operation.

  Gets a value indicating whether access to the object is synchronized (thread safe).

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object To be added.

  Derived classes can provide their own synchronized version of the class using the property. The synchronizing code must perform operations on the property of the object, not directly on the object. This ensures proper operation of collections that are derived from other objects. Specifically, it maintains proper synchronization with other threads that might be simultaneously modifying the object.

  Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.

  The following code example shows how to lock the collection using the during the entire enumeration.

  code reference: System.Collections.Specialized.NameObjectCollectionBase#2

  Retrieving the value of this property is an O(1) operation.

  Gets an object that can be used to synchronize access to the object.