Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- array
Type: array<System.Text.RegularExpressions.Regex[]
The one-dimensional array that is the destination of the elements copied from RegexCollection. The array must have zero-based indexing.
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.