ReadOnlyDirectoryServerCollection.CopyTo Method

Copies all DirectoryServer objects in this collection to the specified array, starting at the specified index of the target array.

Namespace: System.DirectoryServices.ActiveDirectory
Assembly: System.DirectoryServices (in system.directoryservices.dll)

public void CopyTo (
	DirectoryServer[] directoryServers,
	int index
)
public void CopyTo (
	DirectoryServer[] directoryServers, 
	int index
)
public function CopyTo (
	directoryServers : DirectoryServer[], 
	index : int
)
Not applicable.

Parameters

directoryServers

The array of DirectoryServer objects that receives the elements of this collection.

index

The zero-based index in directoryServers where this method starts copying this collection.

Exception typeCondition

ActiveDirectoryOperationException

A call to the underlying directory service resulted in an error.

ArgumentException

The destination array is not large enough, based on the source collection size and the index specified.

ArgumentNullException

directoryServers is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The index specified is out of range of the destination array.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: