CaptureCollection::ICollection::CopyTo Method
.NET Framework (current version)
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: virtual void CopyTo( Array^ array, int arrayIndex ) sealed = ICollection::CopyTo
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)| Exception | Condition |
|---|---|
| ArgumentNullException | array is nullptr. |
| ArgumentOutOfRangeException | arrayIndex is outside the bounds of array. -or- 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.
Show: