Export (0) Print
Expand All

GroupCollection.ICollection.CopyTo Method

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

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

void ICollection.CopyTo(
	Array array,
	int arrayIndex
)

Parameters

array
Type: System.Array

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

arrayIndex
Type: System.Int32

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

Implements

ICollection.CopyTo(Array, Int32)

ExceptionCondition
ArgumentNullException

array is null.

IndexOutOfRangeException

arrayIndex is outside the bounds of array.

-or-

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

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

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.

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8
Show:
© 2014 Microsoft