FreezableCollection<T>.CopyTo Method (T[], Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Copies the entire FreezableCollection<T> to a compatible one-dimensional array, starting at the specified index of the target array.

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public void CopyTo(
	T[] array,
	int index
)

Parameters

array
Type: T[]

The one-dimensional array that is the destination of the elements copied from FreezableCollection<T>.

index
Type: System.Int32

The zero-based index in array at which copying begins.

Exception Condition
ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than 0.

ArgumentException

The number of elements in the source FreezableCollection<T> is greater than the available space from index to the end of the destination array.

Note that this operation performs a shallow copy. The elements are copied to the target array in the same order in which the enumerator iterates through this FreezableCollection<T>.

.NET Framework
Available since 3.0
Return to top
Show: