XmlSchemaSet.CopyTo Method (XmlSchema(), Int32)

 

Copies all the XmlSchema objects from the XmlSchemaSet to the given array, starting at the given index.

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

Public Sub CopyTo (
	schemas As XmlSchema(),
	index As Integer
)

Parameters

schemas
Type: System.Xml.Schema.XmlSchema()

The array to copy the objects to.

index
Type: System.Int32

The index in the array where copying will begin.

The following example copies all the XmlSchema objects in the XmlSchemaSet to an array of XmlSchema objects.

Dim schemaSet As XmlSchemaSet = New XmlSchemaSet
schemaSet.Add("http://www.contoso.com/retail", "http://www.contoso.com/retail.xsd")
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd")
schemaSet.Add("http://www.contoso.com/music", "http://www.contoso.com/music.xsd")

Dim schemas(schemaSet.Count) As XmlSchema
schemaSet.CopyTo(schemas, 0)

.NET Framework
Available since 2.0
Return to top
Show: