Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlSchemaObjectCollection::CopyTo Method (array<XmlSchemaObject^>^, Int32)

 

Copies all the XmlSchemaObjects from the collection into the given array, starting at the given index.

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

public:
void CopyTo(
	array<XmlSchemaObject^>^ array,
	int index
)

Parameters

array
Type: array<System.Xml.Schema::XmlSchemaObject^>^

The one-dimensional array that is the destination of the elements copied from the XmlSchemaObjectCollection. The array must have zero-based indexing.

index
Type: System::Int32

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

Exception Condition
ArgumentNullException

array is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

index is less than zero.

ArgumentException

array is multi-dimensional.

- or -

index is equal to or greater than the length of array.

- or -

The number of elements in the source XmlSchemaObject is greater than the available space from index to the end of the destination array.

InvalidCastException

The type of the source XmlSchemaObject cannot be cast automatically to the type of the destination array.

The specified array must be of a compatible type.

This method uses Copy to copy the elements.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft