DirectoryAttributeCollection.CopyTo(DirectoryAttribute[], Int32) Methode

Definitie

De CopyTo(DirectoryAttribute[], Int32) methode kopieert de volledige verzameling naar een eendimensionale matrix, te beginnen bij de opgegeven index van de doelmatrix.

public:
 void CopyTo(cli::array <System::DirectoryServices::Protocols::DirectoryAttribute ^> ^ array, int index);
public void CopyTo(System.DirectoryServices.Protocols.DirectoryAttribute[] array, int index);
member this.CopyTo : System.DirectoryServices.Protocols.DirectoryAttribute[] * int -> unit
Public Sub CopyTo (array As DirectoryAttribute(), index As Integer)

Parameters

array
DirectoryAttribute[]

Een eendimensionale matrix die de bestemming is van de elementen die uit het DirectoryAttributeCollection object zijn gekopieerd.

index
Int32

De op nul gebaseerde index van array waar kopiëren begint.

Opmerkingen

Exceptions

Exception Condition
ArgumentNullException array is een null-verwijzing (Nothing in Visual Basic).
ArgumentOutOfRangeException index is kleiner dan nul.
ArgumentException array is multidimensionaal.

– of –

Het aantal elementen in de bron DirectoryAttributeCollection is groter dan de beschikbare ruimte van index tot het einde van de bestemming array.
InvalidCastException Het type bron DirectoryAttributeCollection kan niet automatisch worden gecast naar het type van de bestemming array.

Van toepassing op