Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

BigList<(Of <(<'T>)>)>..::..GetRange Method

Creates a new list that contains a subrange of elements from this list. The current list is unchanged.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public BigList<T> GetRange(
	int index,
	int count
)
Public Function GetRange ( _
	index As Integer, _
	count As Integer _
) As BigList(Of T)
public:
BigList<T>^ GetRange(
	int^ index, 
	int^ count
)

Parameters

index
Type: Int32
The starting index of the sub-range.
count
Type: Int32
The number of items in the sub-range. If this is zero, the returned list is empty.

Return Value

A new list with the count items that start at index.

Remarks


This method takes take O(log N), where N is the size of the current list. Although the sub-range is conceptually copied, storage is shared between the two lists until a change is made to the shared items.

Remarks


If a view of a sub-range is desired, instead of a copy, use the more efficient Range(Int32, Int32) method, which provides a view onto a sub-range of items.