mscorlib 2.0.0.0 4.0.0.0 System.Object System.Collections.Generic.ICollection<T> System.Collections.Generic.IEnumerable<T> System.Collections.Generic.IList<T> System.Collections.Generic.IReadOnlyCollection<T> System.Collections.Generic.IReadOnlyList<T> System.Collections.IList System.Diagnostics.DebuggerDisplay("Count={Count}") System.Diagnostics.DebuggerTypeProxy(typeof(System.Collections.Generic.CollectionDebuggerView`1)) System.Runtime.InteropServices.ComVisible(false) To be added.

An instance of the generic class is always read-only. 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. See for a modifiable version of this class.

Provides the base class for a generic read-only collection.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.
  To be added.
  To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

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

  Gets the number of elements contained in the instance.

- Method
  2.0.0.0
  4.0.0.0
  System.Collections.Generic.IEnumerator<T>

  The foreach statement of the C# language (for each in Visual C++, 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. 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 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. You cannot set to the first element of the collection again; you must create a new enumerator instance instead.

  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.

  Default implementations of collections in are not synchronized.

  This method is an O(1) operation.

  Returns an enumerator that iterates through the .

  An for the .

- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  T `` To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  System.Collections.Generic.IList<T> To be added.

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

  Returns the that the wraps.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Void To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  T `` To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  If the type of the source cannot be cast automatically to the type of the destination , the non-generic implementations of throw , whereas the generic implementations throw .

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

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Copies the elements of the to an , starting at a particular index.

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

  Default implementations of collections in are not synchronized.

  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.

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

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

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

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

- Property
  2.0.0.0
  4.0.0.0
  System.Object To be added.

  Default implementations of collections in are not synchronized.

  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.

  returns an object that can be used to synchronize access to the . Synchronization is effective only if all threads lock this object before accessing the collection. The following code shows the use of the property for C#, Visual C++, and Visual Basic.

  `ICollection ic = ...; lock (ic.SyncRoot) { // Access the collection. }` `Dim ic As ICollection = ... SyncLock ic.SyncRoot ' Access the collection. End SyncLock` `ICollection^ ic = ...; try { Monitor::Enter(ic->SyncRoot); // Access the collection. } finally { Monitor::Exit(ic->SyncRoot); }`

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

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

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

- Method
  2.0.0.0
  4.0.0.0
  System.Collections.IEnumerator

  The foreach statement of the C# language (for each in Visual C++, 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.

  Default implementations of collections in are not synchronized.

  This method is an O(1) operation.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Returns an enumerator that iterates through a collection.

  An that can be used to iterate through the collection.

- Method
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Adds an item to the . This implementation always throws .

  The position into which the new element was inserted.

  The to add to the .
- Method
  2.0.0.0
  4.0.0.0
  System.Void

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Removes all items from the . This implementation always throws .

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  This method determines equality using the default comparer .

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

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Determines whether the contains a specific value.

  true if the is found in the ; otherwise, false.

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

  This method determines equality using the default comparer .

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

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Determines the index of a specific item in the .

  The index of if found in the list; otherwise, -1.

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

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Inserts an item to the at the specified index. This implementation always throws .

  The zero-based index at which should be inserted. The to insert into the .
- Property
  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.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Gets a value indicating whether the has a fixed size.

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

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Gets a value indicating whether the is read-only.

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

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Removes the first occurrence of a specific object from the . This implementation always throws .

  The to remove from the .
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Removes the item at the specified index. This implementation always throws .

  The zero-based index of the item to remove.