RegexCollection.CopyTo Method (array<Regex , Int32)

Copies the entire RegexCollection to a compatible one-dimensional array, starting at the specified index of the target array.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)

Syntax

'Declaration
Sub CopyTo ( _
    array As Regex(), _
    index As Integer _
)
void CopyTo(
    Regex[] array,
    int index
)

Parameters

  • index
    Type: System.Int32
    The zero-based index in array at which copying begins.

Exceptions

Exception Condition
ArgumentNullException

array is a null reference.

ArgumentOutOfRangeException

index is less than zero.

ArgumentException

array is multidimensional.

-or-

The number of elements in the source RegexCollection is greater than the available space from index to the end of the destination array.

InvalidCastException

The type of the source RegexCollection cannot be cast automatically to the type of the destination array.

.NET Framework Security

See Also

Reference

RegexCollection Interface

CopyTo Overload

Microsoft.Office.Tools Namespace