Skip to main content
.NET Framework Class Library
UIElementCollectionCopyTo Method (UIElement, Int32)

Copies a UIElement from a UIElementCollection to an array, starting at a specified index position.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
Syntax
Public Overridable Sub CopyTo ( _
	array As [%$TOPIC/ms590015_en-us_VS_110_3_0_0_0_0%](), _
	index As [%$TOPIC/ms590015_en-us_VS_110_3_0_0_0_1%] _
)
public virtual void CopyTo(
	[%$TOPIC/ms590015_en-us_VS_110_3_0_1_0_0%][] array,
	[%$TOPIC/ms590015_en-us_VS_110_3_0_1_0_1%] index
)
public:
virtual void CopyTo(
	array<[%$TOPIC/ms590015_en-us_VS_110_3_0_2_0_0%]^>^ array, 
	[%$TOPIC/ms590015_en-us_VS_110_3_0_2_0_1%] index
)
abstract CopyTo : 
        array:[%$TOPIC/ms590015_en-us_VS_110_3_0_3_0_0%][] * 
        index:[%$TOPIC/ms590015_en-us_VS_110_3_0_3_0_1%] -> unit  
override CopyTo : 
        array:[%$TOPIC/ms590015_en-us_VS_110_3_0_3_0_2%][] * 
        index:[%$TOPIC/ms590015_en-us_VS_110_3_0_3_0_3%] -> unit
public function CopyTo(
	array : [%$TOPIC/ms590015_en-us_VS_110_3_0_4_0_0%][], 
	index : [%$TOPIC/ms590015_en-us_VS_110_3_0_4_0_1%]
)

Parameters

array
Type: System.WindowsUIElement

An array of UIElement objects.

index
Type: SystemInt32

The index position of the element where copying begins.

Version Information

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1