XmlSchemaSet.CopyTo(XmlSchema[], Int32) Methode

Definitie

Kopieert alle XmlSchema objecten van de XmlSchemaSet naar de opgegeven matrix, beginnend bij de opgegeven index.

public:
 void CopyTo(cli::array <System::Xml::Schema::XmlSchema ^> ^ schemas, int index);
public void CopyTo(System.Xml.Schema.XmlSchema[] schemas, int index);
member this.CopyTo : System.Xml.Schema.XmlSchema[] * int -> unit
Public Sub CopyTo (schemas As XmlSchema(), index As Integer)

Parameters

schemas
XmlSchema[]

De matrix naar de objecten kopiëren.

index
Int32

De index in de matrix waar kopiëren begint.

Voorbeelden

In het volgende voorbeeld worden alle XmlSchema objecten in de XmlSchemaSet objecten gekopieerd naar een matrix met XmlSchema objecten.

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)
XmlSchemaSet schemaSet = 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");

XmlSchema[] schemas = new XmlSchema[schemaSet.Count];
schemaSet.CopyTo(schemas, 0);

Van toepassing op