Creates a new list that contains a subrange of elements from this list. The
current list is unchanged.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic BigList<T> GetRange(
int index,
int count
)
public:
BigList<T>^ GetRange(
int index,
int count
)
Parameters
- index
- Type: SystemInt32
The starting index of the sub-range. - count
- Type: SystemInt32
The number of items in the sub-range. If this is zero,
the returned list is empty.
Return Value
Type:
BigListTA new list with the
count items that start at
index.
RemarksThis 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.
RemarksIf 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.
See Also