Adds the elements of the specified ICollection to the end of the current instance.
- c
- The ICollection whose elements are added to the end of the current instance.
Type Reason ArgumentNullException c is null. NotSupportedException The current instance is read-only or has a fixed size.
Operation
As described above.If the ArrayList.Count of the current instance plus the size of the collection being added is greater than the ArrayList.Capacity of the current instance, the capacity of the current instance is either doubled or increased to the new ArrayList.Count, whichever is greater. The internal array is reallocated to accommodate the new elements and the existing elements are copied to the new array before the new elements are added.
Note: For the default implementation, if the current instance can accommodate the new elements without increasing the ArrayList.Capacity, this method is an O(n) operation, where n is the number of elements to be added. If the capacity needs to be increased to accommodate the new elements, this method becomes an O(n+m) operation, where n is the number of elements to be added and m is ArrayList.Count .
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0