Export (0) Print
Expand All

MatchCollection.CopyTo Method

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

[Visual Basic]
Public Overridable Sub CopyTo( _
   ByVal array As Array, _
   ByVal arrayIndex As Integer _
) Implements ICollection.CopyTo
[C#]
public virtual void CopyTo(
 Array array,
 int arrayIndex
);
[C++]
public: virtual void CopyTo(
 Array* array,
 int arrayIndex
);
[JScript]
public function CopyTo(
   array : Array,
 arrayIndex : int
);

Parameters

array
The array the collection is to be copied into.
arrayIndex
The position in the array where copying is to begin.

Implements

ICollection.CopyTo

Remarks

Since the collection is copied into the array starting at the given index, the destination array must be at least as large as the entire collection.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

MatchCollection Class | MatchCollection Members | System.Text.RegularExpressions Namespace

Show:
© 2014 Microsoft