EN
Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.
Denne dokumentation er arkiveret og vedligeholdes ikke.

AutomationElementCollection.CopyTo Method (Array, Int32)

Copies the collection's elements to an array, starting at the specified index in the target array.

Namespace:  System.Windows.Automation
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

'Deklaration
Public Overridable Sub CopyTo ( _
	array As Array, _
	index As Integer _
)

Parameters

array
Type: System.Array
The destination of the elements copied from the collection.
index
Type: System.Int32
The zero-based index in the target array where copying should begin.

Implements

ICollection.CopyTo(Array, Int32)

The following example shows how to copy an AutomationElementCollection to an array of objects.


' elementCollection is an AutomationElementCollection.
Dim elementUntypedArray(elementCollection.Count) As Object
elementCollection.CopyTo(elementUntypedArray, 0)


.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Vis: