XmlSchemaSet.CopyTo(XmlSchema[], Int32) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Copie tous les XmlSchema objets du XmlSchemaSet tableau donné, en commençant à l’index donné.
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)
Paramètres
- schemas
- XmlSchema[]
Tableau vers lequel copier les objets.
- index
- Int32
Index dans le tableau où la copie commence.
Exemples
L’exemple suivant copie tous les XmlSchema objets dans le XmlSchemaSet tableau d’objets XmlSchema .
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);