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

AdvisableCollection<T>.GetRange Method

Creates a shallow copy of a range of elements in the source AdvisableCollection<T>.

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 List<T> GetRange(
	int index,
	int count
)

Parameters

index
Type: System.Int32
The zero-based index at which the range starts.
count
Type: System.Int32
The number of elements in the range.

Return Value

Type: List<T>
A shallow copy of a range of elements in the source AdvisableCollection<T>.
Exceptions
ExceptionCondition
ArgumentOutOfRangeException

index is less than 0.

-or-

count is less than 0.

ArgumentExceptionindex and count do not denote a valid range of elements in the AdvisableCollection<T>.
See Also