XmlSchema.Includes 屬性

定義

取得包含和匯入結構描述的集合。

public:
 property System::Xml::Schema::XmlSchemaObjectCollection ^ Includes { System::Xml::Schema::XmlSchemaObjectCollection ^ get(); };
public System.Xml.Schema.XmlSchemaObjectCollection Includes { get; }
member this.Includes : System.Xml.Schema.XmlSchemaObjectCollection
Public ReadOnly Property Includes As XmlSchemaObjectCollection

屬性值

XmlSchemaObjectCollection

已包含和匯入之結構描述的 XmlSchemaObjectCollection

備註

方法 Add 只會 XmlSchemaExternal 預期和其衍生類型 (XmlSchemaImportXmlSchemaIncludeXmlSchemaRedefine) 做為參數。 下列範例說明如何將包含的架構新增至 Includes 現有 XmlSchema 物件的集合。

Dim schema As XmlSchema = New XmlSchema()  

Dim textReader As XmlTextReader = New XmlTextReader("include.xsd")  
Dim includeSchema As XmlSchema = XmlSchema.Read(textReader, null)  

Dim include As XmlSchemaInclude = New XmlSchemaInclude()  
include.Schema = includeSchema;  
schema.Includes.Add(include);  
XmlSchema schema = new XmlSchema();  

XmlTextReader textReader = new XmlTextReader("include.xsd");  
XmlSchema includeSchema = XmlSchema.Read(textReader, null);  

XmlSchemaInclude include = new XmlSchemaInclude();  
include.Schema = includeSchema;  
schema.Includes.Add(include);  

適用於