CopyTo Method

[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 beginning 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

  • arrayIndex
    Type: System. . :: . .Int32
    The position in the destination array where the copying is to begin.

Implements

ICollection. . :: . .CopyTo(Array, Int32)

Remarks

Because the entire collection is copied into the array starting at the given index, the destination array must be at least as large as the collection.

.NET Framework Security

See Also

Reference

GroupCollection Class

System.Text.RegularExpressions Namespace