RegExpMatchList GetRange Method C# API
Creates a shallow copy of a range of elements in the source RegExpMatchList.

Namespace: Facilita.Native
Assembly: clrNativeWrapper (in clrNativeWrapper.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public RegExpMatchList 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

A shallow copy of a range of elements in the source RegExpMatchList.
Exceptions

ExceptionCondition
System ArgumentOutOfRangeExceptionindex is less than 0.
-or-
count is less than 0.
System ArgumentExceptionindex and count do not denote a valid range of elements in the RegExpMatchList.
Remarks

A shallow copy of a collection of reference types, or a subset of that collection, contains only the references to the elements of the collection. The objects themselves are not copied. The references in the new list point to the same objects as the references in the original list.

A shallow copy of a collection of value types, or a subset of that collection, contains the elements of the collection. However, if the elements of the collection contain references to other objects, those objects are not copied. The references in the elements of the new collection point to the same objects as the references in the elements of the original collection.

In contrast, a deep copy of a collection copies the elements and everything directly or indirectly referenced by the elements.

This method is an O(n) operation, where n is count.

See Also