Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Collections Namespace / Advisable­Collection(T) Class / Advisable­Collection(T) Methods / Advisable­Collection(T).​Insert­Range Method

AdvisableCollection<T>.InsertRange Method

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

Namespace:  PostSharp.Patterns.Collections
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.43.0 (5.0.43.0)
Syntax
C#
public void InsertRange(
	int index,
	IEnumerable<T> collection
)

Parameters

index
Type: System.Int32
The zero-based index at which the new elements should be inserted.
collection
Type: System.Collections.Generic.IEnumerable<T>
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
ExceptionCondition
ArgumentNullExceptioncollection is null.
ArgumentOutOfRangeException

index is less than 0.

-or-

index is greater than Count
See Also