PostSharp / / API Reference / Post­Sharp.​Patterns.​Collections / Advisable­Collection<T> / Insert­Range
Open sandbox

Method InsertRange

InsertRange(Int32, IEnumerable<T>)

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

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

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

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.

Type Condition

collection is null.


index is less than 0.


index is greater than Count