PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Collection<T>Insert­Range
Open sandboxFocus

AdvisableCollection<T>.InsertRange Method

InsertRange(Int32, IEnumerable<T>)

Inserts the elements of a collection into the AdvisableCollection<T> at the specified index.

Declaration
public void InsertRange(int index, IEnumerable<T> collection)
Parameters
Type Name Description
Int32 index

The zero-based index at which the new elements should be inserted.

System.Collections.Generic.IEnumerable<T> collection

The collection whose elements should be inserted into the AdvisableCollection<T>. The collection itself cannot be null, but it can contain elements that are null, if type T is a reference type.

Exceptions
Type Condition
ArgumentNullException

collection is null.

ArgumentOutOfRangeException

index is less than 0.

-or-

index is greater than Count