XmlAnyElementAttributes.ICollection.CopyTo Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Copies the elements from the attribute collection to an array, starting at a specified index of the array.
Assembly: System.Xml.Serialization (in System.Xml.Serialization.dll)
'Declaration Private Sub CopyTo ( _ array As Array, _ index As Integer _ ) Implements ICollection.CopyTo
Parameters
- array
- Type: System.Array
The one-dimensional destination Array for the attribute elements copied from the XmlAnyElementAttributes collection.
- index
- Type: System.Int32
The zero-based index in array at which copying begins.
Implements
ICollection.CopyTo(Array, Int32)| 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. |
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.