CaptureCollection.CopyTo Method (Array, Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Copies all the elements of the collection to the given array beginning at the given index.

Namespace:   System.Text.RegularExpressions
Assembly:  System (in System.dll)

Public Sub CopyTo (
	array As Array,
	arrayIndex As Integer
)

Parameters

array
Type: System.Array

The array the collection is to be copied into.

arrayIndex
Type: System.Int32

The position in the destination array where copying is to begin.

Exception Condition
ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is outside the bounds of array.

-or-

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

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.

System_CAPS_warningWarning

This member is not present in the Portable Class Library. If you are developing applications that target the Portable Class Library, use the CaptureCollection.ICollection.CopyTo method instead.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: