public void ReplaceRange(
int index,
int count,
IEnumerable<T> collection
)
Public Sub ReplaceRange (
index As Integer,
count As Integer,
collection As IEnumerable(Of T)
)
public:
virtual void ReplaceRange(
int index,
int count,
IEnumerable<T>^ collection
) sealed
abstract ReplaceRange :
index : int *
count : int *
collection : IEnumerable<'T> -> unit
override ReplaceRange :
index : int *
count : int *
collection : IEnumerable<'T> -> unit
If the length of the CircularListT is n and the length of the collection to insert is m, then replacement at the first or last position has O(m) cost.
If the elements to remove and to add have the same size, then the cost is O(m) at any position.
If capacity increase is needed (considering actual list size), or when the replacement of different amount of elements to remove and insert is performed in the middle of the CircularListT, the cost is O(Max(n, m)), and in practice no more than n/2 elements are moved.
ArgumentOutOfRangeException | index is not a valid index in the CircularListT. |
ArgumentNullException | collection must not be . |