XmlSchemaSet.CopyTo(XmlSchema[], Int32) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Kopierar alla XmlSchema objekt från XmlSchemaSet till den angivna matrisen med början vid det angivna indexet.
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)
Parametrar
- schemas
- XmlSchema[]
Matrisen som objekten ska kopieras till.
- index
- Int32
Indexet i matrisen där kopieringen börjar.
Exempel
I följande exempel kopieras alla XmlSchema objekt i XmlSchemaSet till en matris med XmlSchema objekt.
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);