XmlSchemaSet.Contains 方法

定義

指出 XML 結構描述定義語言 (XSD) 結構描述是否位於 XmlSchemaSet 中。

多載

Contains(String)

指出具有指定目標命名空間 URI 的 XML 結構描述定義語言 (XSD) 結構描述是否位於 XmlSchemaSet 中。

Contains(XmlSchema)

指出指定的 XML 結構描述定義語言 (XSD) XmlSchema 物件是否位於 XmlSchemaSet 中。

Contains(String)

Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs

指出具有指定目標命名空間 URI 的 XML 結構描述定義語言 (XSD) 結構描述是否位於 XmlSchemaSet 中。

public:
 bool Contains(System::String ^ targetNamespace);
public bool Contains (string? targetNamespace);
public bool Contains (string targetNamespace);
member this.Contains : string -> bool
Public Function Contains (targetNamespace As String) As Boolean

參數

targetNamespace
String

結構描述 targetNamespace 屬性。

傳回

如果具有指定的目標命名空間 URI 的結構描述位於 XmlSchemaSet,則為 true,否則為 false

備註

方法會偵測間接新增至 XmlSchemaSetContains 架構;例如,匯入的架構。 因此,如果命名空間的 http://www.contoso.com/retail 架構會將命名空間的架構 http://www.contoso.com/books 新增至 XmlSchemaSet ,以 http://www.contoso.com/books 作為參數呼叫 Contains ,它會傳 true 回 。

適用於

Contains(XmlSchema)

Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs

指出指定的 XML 結構描述定義語言 (XSD) XmlSchema 物件是否位於 XmlSchemaSet 中。

public:
 bool Contains(System::Xml::Schema::XmlSchema ^ schema);
public bool Contains (System.Xml.Schema.XmlSchema schema);
member this.Contains : System.Xml.Schema.XmlSchema -> bool
Public Function Contains (schema As XmlSchema) As Boolean

參數

schema
XmlSchema

XmlSchema 物件。

傳回

如果 XmlSchema 物件在 XmlSchemaSet 中,則為 true,否則為 false

例外狀況

以參數形式傳遞的 XmlSchemaSet 物件為 null

適用於