XmlSchemaSet.CopyTo(XmlSchema[], Int32) 메서드

정의

지정된 인덱스부터 시작하여 XmlSchema의 모든 XmlSchemaSet 개체를 지정된 배열에 복사합니다.

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)

매개 변수

schemas
XmlSchema[]

개체를 복사할 대상 배열입니다.

index
Int32

복사를 시작할 배열 내의 인덱스입니다.

예제

다음 예제에서는 개체 배열 XmlSchema 에 있는 XmlSchemaSet 모든 개체를 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);  

적용 대상