System.Xml.Schema.XmlSchemaSet.Contains Method

Indicates whether an XML Schema definition language (XSD) schema with the specified target namespace URI is in the System.Xml.Schema.XmlSchemaSet.

Syntax

public bool Contains (string targetNamespace)

Parameters

targetNamespace
The schema targetNamespace property.

Returns

true if a schema with the specified target namespace URI is in the System.Xml.Schema.XmlSchemaSet; otherwise, false.

Remarks

Schemas that are indirectly added to the System.Xml.Schema.XmlSchemaSet are detected by the XmlSchemaSet.Contains(string) method; for example, imported schemas. As 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 System.Xml.Schema.XmlSchemaSet, calling XmlSchemaSet.Contains(string) with http://www.contoso.com/books as a parameter, it returns true.

Requirements

Namespace: System.Xml.Schema
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0