mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 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.IList System.Diagnostics.DebuggerDisplay("Count={Count}") System.Diagnostics.DebuggerTypeProxy(typeof(System.Collections.CollectionDebuggerView)) System.Runtime.InteropServices.ComVisible(true)

A instance is always modifiable. See for a read-only version of this class.

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 capacity can be decreased by setting the property explicitly.

Provides the abstract base class for a strongly typed 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 .

  This constructor is an O(1) operation.

  Initializes a new instance of the class with the default initial capacity.

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

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

  Initializes a new instance of the class with the specified capacity.

  The number of elements that the new list can initially store.
- Property
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Int32 To be added.

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

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

  The capacity can be decreased by setting the property explicitly. When the value of is set explicitly, the internal array is also reallocated to accommodate the specified capacity.

  Retrieving the value of this property is an O(1) operation; setting the property is an O() operation, where is the new capacity.

  Gets or sets the number of elements that the can contain.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  is set to zero.

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

  To perform custom actions before or after the collection is cleared, override the protected or method.

  Removes all objects from the instance. This method cannot be overridden.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 To be added: an object of type 'int' To be added

  Gets the number of elements contained in the instance. This property cannot be overridden.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Collections.IEnumerator

  [Visual Basic, C#]

  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, calling throws an exception. 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, calling throws an exception. 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 the next call to or throws an . If the collection is modified between and , returns the element that it is set to, even if the enumerator is already invalidated.

  The enumerator does not have exclusive access to the collection; therefore, 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.

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

  Returns an enumerator that iterates through the instance.

  An for the instance.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Collections.ArrayList To be added: an object of type 'ArrayList'

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  Gets an containing the list of elements in the instance.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Collections.IList To be added: an object of type 'IList'

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

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

  Gets an containing the list of elements in the instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  The default implementation of this method is intended to be overridden by a derived class to perform some action before the collection is cleared.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  If the process fails, the collection reverts back to its previous state.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes when clearing the contents of the instance.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  The default implementation of this method is intended to be overridden by a derived class to perform some action after the collection is cleared.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes after clearing the contents of the instance.

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

  The default implementation of this method is intended to be overridden by a derived class to perform some action before the specified element is inserted.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  If the process fails, the collection reverts back to its previous state.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes before inserting a new element into the instance.

  The zero-based index at which to insert . The new value of the element at .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The default implementation of this method is intended to be overridden by a derived class to perform some action after the specified element is inserted.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  The collection reverts back to its previous state if one of the following occurs:

  The process fails.

  This method is overridden to throw an exception.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes after inserting a new element into the instance.

  The zero-based index at which to insert . The new value of the element at .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The default implementation of this method is intended to be overridden by a derived class to perform some action before the specified element is removed.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  If the process fails, the collection reverts back to its previous state.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes when removing an element from the instance.

  The zero-based index at which can be found. The value of the element to remove from .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The default implementation of this method is intended to be overridden by a derived class to perform some action after the specified element is removed.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  The collection reverts back to its previous state if one of the following occurs:

  The process fails.

  This method is overridden to throw an exception.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes after removing an element from the instance.

  The zero-based index at which can be found. The value of the element to remove from .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  The default implementation of this method is intended to be overridden by a derived class to perform some action before the specified element is set.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  If the process fails, the collection reverts back to its previous state.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes before setting a value in the instance.

  The zero-based index at which can be found. The value to replace with . The new value of the element at .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  The default implementation of this method is intended to be overridden by a derived class to perform some action after the specified element is set.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  The collection reverts back to its previous state if one of the following occurs:

  The process fails.

  This method is overridden to throw an exception.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes after setting a value in the instance.

  The zero-based index at which can be found. The value to replace with . The new value of the element at .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  The default implementation of this method determines whether is null, and, if so, throws . It is intended to be overridden by a derived class to perform additional action when the specified element is validated.

  The On* methods are invoked only on the instance returned by the property, but not on the instance returned by the property.

  The default implementation of this method is an O(1) operation.

  Performs additional custom processes when validating a value.

  The object to validate.
- 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 element at the specified index of the instance. This method is not overridable.

  The zero-based index of the element to remove.
- 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.

  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 instance 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 during the entire enumeration:

  code reference: System.Collections.CollectionBase#2

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

  Gets a value indicating whether access to the 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 using the property. The synchronizing code must perform operations on the of the , not directly on the . 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.CollectionBase#2

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

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

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  If already equals the capacity, the capacity of the list is doubled by automatically reallocating the internal array and copying the existing elements 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 object to the end of the .

  The index at which the has been added.

  The to be added to the end of the .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  This method performs a linear search; therefore, this method is an O() operation, where is .

  This method determines equality by calling .

  Starting with the .NET Framework 2.0, this method uses the collection’s objects’ and methods on to determine whether exists. In the earlier versions of the .NET Framework, this determination was made by using the and methods of the parameter on the objects in the collection.

  Determines whether the contains a specific element.

  true if the contains the specified ; otherwise, false.

  The to locate in the .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  This method performs a linear search; therefore, this method is an O() operation, where is .

  This method determines equality by calling .

  Starting with the .NET Framework 2.0, this method uses the collection’s objects’ and methods on to determine whether exists. In the earlier versions of the .NET Framework, this determination was made by using the and methods of the parameter on the objects in the collection.

  Searches for the specified and returns the zero-based index of the first occurrence within the entire .

  The zero-based index of the first occurrence of within the entire , if found; otherwise, -1.

  The to locate in the .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  If already equals the capacity, the capacity of the list is doubled by automatically reallocating the internal array before the new element is inserted.

  If is equal to , is added to the end of .

  In collections of contiguous elements, such as lists, the elements that follow the insertion point move down to accommodate the new element. 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 .

  Inserts an element into the at the specified index.

  The zero-based index at which should be inserted. The to insert.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  A collection with a fixed size does not allow the addition or removal of elements after the collection is created, but it allows the modification of existing elements.

  A collection with a fixed size is simply a collection with a wrapper that prevents adding and removing elements; therefore, if changes are made to the underlying collection, including the addition or removal of elements, the fixed-size collection reflects those changes.

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

  Gets a value indicating whether the has a fixed size.

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

  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 a value indicating whether the is read-only.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` To be added. To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  If the does not contain the specified object, the remains unchanged. No exception is thrown.

  This method performs a linear search; therefore, this method is an O() operation, where is .

  This method determines equality by calling .

  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.

  Removes the first occurrence of a specific object from the .

  The to remove from the .