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 whole collection to a compatible one-dimensional array, starting at the specified index of the target array.
Namespace: Microsoft.Web.Administration
Assembly: Microsoft.Web.Administration (in microsoft.web.administration.dll)
Syntax
'Declaration
Private Sub System.Collections.ICollection.CopyTo ( _
array As Array, _
index As Integer _
) Implements ICollection.CopyTo
'Usage
Dim instance As WorkerProcessCollection
Dim array As Array
Dim index As Integer
CType(instance, ICollection).CopyTo(array, index)
void ICollection.CopyTo (
Array array,
int index
)
private:
virtual void System.Collections.ICollection.CopyTo (
Array^ array,
int index
) sealed = ICollection::CopyTo
Not applicable.
Parameters
- array
The one-dimensional Array that is the destination of the elements copied from List. The Array must have zero-based indexing.
- index
The zero-based index in array at which copying starts.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException |
array is a null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException |
index is less than 0. |
ArgumentException |
index is equal to or greater than the length of array. -or- The number of elements in the current collection is greater than the available space from index to the end of the destination array. |
Remarks
This method uses System.Array.Copy to copy the elements.
The elements are copied to the Array in the same order in which the enumerator iterates through the List.
This method is an O(n) operation, where n is Count.
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
WorkerProcessCollection Class
WorkerProcessCollection Members
Microsoft.Web.Administration Namespace