This documentation is archived and is not being maintained.

GroupCollection.CopyTo Method

Copies all the elements of the collection to the given array beginning 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 destination array where the copying is to begin.

Implements

ICollection.CopyTo

Remarks

Since 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.

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

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

Show: