- index
- The zero-based ArrayList index at which the range starts.
- count
- The number of elements in the range.
An ArrayList which represents a subset of the elements in the source ArrayList.
Type Reason ArgumentOutOfRangeException index < 0.
-or-
count < 0.
ArgumentException ArrayList.Count of the current instance - index < count.
This method does not create copies of the elements. The new ArrayList is only a view window into the source ArrayList. However, all subsequent changes to the source ArrayList must be done through this view window ArrayList. If changes are made directly to the source ArrayList, the view window ArrayList is invalidated and any operations on it will return an InvalidOperationException.
This method is an O(1) operation.