NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DirectoryEntryCollection.CopyTo

Copies the elements of this instance into an Array, starting at a particular index into the array.

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

Parameters

array
An array of type Array that will hold this collection's elements.
index
The beginning index in the array where the elements will be copied.

Exceptions

Exception Type Condition
ArgumentException The index plus the size of this collection is greater than the length ot the Array.
ArgumentNullException The array is a null reference (in Visual Basic Nothing).
IndexOutOfRangeException The index is out of the array's bounds.

See Also

DirectoryEntryCollection Class | DirectoryEntryCollection Members | System.DirectoryServices Namespace