Condividi tramite


XmlElementAttributes.ICollection.CopyTo Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Copies the elements from the attribute collection to an array, starting at a specified index of the array.

Namespace:  System.Xml.Serialization
Assembly:  System.Xml.Serialization (in System.Xml.Serialization.dll)

Syntax

'Declaration
Private Sub CopyTo ( _
    array As Array, _
    index As Integer _
) Implements ICollection.CopyTo
void ICollection.CopyTo(
    Array array,
    int index
)

Parameters

  • index
    Type: System.Int32
    The zero-based index in array at which copying begins.

Implements

ICollection.CopyTo(Array, Int32)

Exceptions

Exception Condition
ArgumentOutOfRangeException

The index is less than zero.

ArgumentException

The index is greater than the length of the array, the length of the array is exceeded when the attribute elements are added, or the array is multidimensional.

Remarks

The destination Array must have zero-based indexing or an exception will be thrown.

Note that when an interface method is explicitly implemented, it is no longer visible as a public member of the class. The only way to access it is through the interface.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.