XmlSchemaSet.CopyTo(XmlSchema[], Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copies all the XmlSchema objects from the XmlSchemaSet to the given array, starting at the given 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[]
The array to copy the objects to.
- index
- Int32
The index in the array where copying will begin.
Examples
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)
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);
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET