XmlSchemaSet.Contains XmlSchemaSet.Contains XmlSchemaSet.Contains XmlSchemaSet.Contains Method

定义

指示 XML 架构定义语言 (XSD) 架构是否位于 XmlSchemaSetIndicates whether an XML Schema definition language (XSD) schema is in the XmlSchemaSet.

重载

Contains(String) Contains(String) Contains(String) Contains(String)

指示具有指定目标命名空间 URI 的 XML 架构定义语言 (XSD) 架构是否位于 XmlSchemaSetIndicates whether an XML Schema definition language (XSD) schema with the specified target namespace URI is in the XmlSchemaSet.

Contains(XmlSchema) Contains(XmlSchema) Contains(XmlSchema) Contains(XmlSchema)

指示指定的 XML 架构定义语言 (XSD) XmlSchema 对象是否位于 XmlSchemaSetIndicates whether the specified XML Schema definition language (XSD) XmlSchema object is in the XmlSchemaSet.

Contains(String) Contains(String) Contains(String) Contains(String)

指示具有指定目标命名空间 URI 的 XML 架构定义语言 (XSD) 架构是否位于 XmlSchemaSetIndicates whether an XML Schema definition language (XSD) schema with the specified target namespace URI is in the XmlSchemaSet.

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

参数

targetNamespace
String String String String

架构 targetNamespace 属性。The schema targetNamespace property.

返回

如果具有指定目标命名空间 URI 的架构位于 XmlSchemaSet,则为 true;否则为 falsetrue if a schema with the specified target namespace URI is in the XmlSchemaSet; otherwise, false.

注解

间接地添加到的架构XmlSchemaSet检测到的Contains方法; 例如,导入的架构。Schemas that are indirectly added to the XmlSchemaSet are detected by the Contains method; for example, imported schemas. 因此,如果架构http://www.contoso.com/retail导入的架构命名空间http://www.contoso.com/books命名空间添加到XmlSchemaSet,则调用Containshttp://www.contoso.com/books作为参数,它将返回trueAs a result, if a schema for the http://www.contoso.com/retail namespace which imports a schema for the http://www.contoso.com/books namespace is added to the XmlSchemaSet, calling Contains with http://www.contoso.com/books as a parameter, it returns true.

Contains(XmlSchema) Contains(XmlSchema) Contains(XmlSchema) Contains(XmlSchema)

指示指定的 XML 架构定义语言 (XSD) XmlSchema 对象是否位于 XmlSchemaSetIndicates whether the specified XML Schema definition language (XSD) XmlSchema object is in the 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

参数

返回

如果 XmlSchema 对象在 XmlSchemaSet 中,则为 true;否则为 falsetrue if the XmlSchema object is in the XmlSchemaSet; otherwise, false.

异常

作为参数传递的 XmlSchemaSetnullThe XmlSchemaSet passed as a parameter is null.

适用于