Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CaptureCollection.ICollection.CopyTo Method

.NET Framework 4.6 and 4.5

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)

private abstract CopyTo : 
        array:Array * 
        arrayIndex:int -> unit  
private override CopyTo : 
        array:Array * 
        arrayIndex:int -> unit


Type: System.Array

The one-dimensional array the collection is to be copied into.

Type: System.Int32

The zero-based index in the destination array where copying is to begin.


ICollection.CopyTo(Array, Int32)


array is a null reference (Nothing in Visual Basic).


arrayIndex is outside the bounds of array.


arrayIndex plus CaptureCollection.Count is outside the bounds of array.

This member is an explicit interface implementation. It can be used only when the CaptureCollection instance is cast to an ICollection interface object.

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

.NET Framework

Supported in: 4.6

Portable Class Library

Supported in: Portable Class Library
© 2015 Microsoft