Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Copies all the elements of the collection to the given array starting at the given index.
Namespace: System.Text.RegularExpressions
Assembly: System.Text.RegularExpressions (in System.Text.RegularExpressions.dll)
Syntax
'Declaration
Public Sub CopyTo ( _
array As Array, _
arrayIndex As Integer _
)
public void CopyTo(
Array array,
int arrayIndex
)
public:
virtual void CopyTo(
Array^ array,
int arrayIndex
) sealed
abstract CopyTo :
array:Array *
arrayIndex:int -> unit
override CopyTo :
array:Array *
arrayIndex:int -> unit
public final function CopyTo(
array : Array,
arrayIndex : int
)
Parameters
- array
Type: System. . :: . .Array
The array the collection is to be copied into.
- arrayIndex
Type: System. . :: . .Int32
The position in the array where copying is to begin.
Implements
ICollection. . :: . .CopyTo(Array, Int32)
Remarks
Because the collection is copied into the array starting at the given index, the destination array must be at least as large as the entire collection.
Because the MatchCollection object is generally populated by using lazy evaluation, trying to copy the collection before it has been fully populated may throw a RegexMatchTimeoutException exception. This exception can be thrown if a time-out value for matching operations is in effect, and the attempt to find a single match exceeds that time-out interval.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.