Edit

Share via


XmlSchemaCollection.Contains Method

Definition

Gets a value indicating whether a schema with the specified namespace is in the collection.

Overloads

Contains(String)

Gets a value indicating whether a schema with the specified namespace is in the collection.

Contains(XmlSchema)

Gets a value indicating whether the targetNamespace of the specified XmlSchema is in the collection.

Remarks

Important

The XmlSchemaCollection class is obsolete in .NET Framework version 2.0 and has been replaced by the XmlSchemaSet class.

Contains(String)

Source:
XmlSchemaCollection.cs
Source:
XmlSchemaCollection.cs
Source:
XmlSchemaCollection.cs
Source:
XmlSchemaCollection.cs

Gets a value indicating whether a schema with the specified namespace is in the collection.

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

Parameters

ns
String

The namespace URI associated with the schema. For XML Schemas, this will typically be the target namespace.

Returns

true if a schema with the specified namespace is in the collection; otherwise, false.

Remarks

Important

The XmlSchemaCollection class is obsolete in .NET Framework version 2.0 and has been replaced by the XmlSchemaSet class.

Applies to

Contains(XmlSchema)

Source:
XmlSchemaCollection.cs
Source:
XmlSchemaCollection.cs
Source:
XmlSchemaCollection.cs
Source:
XmlSchemaCollection.cs

Gets a value indicating whether the targetNamespace of the specified XmlSchema is in the collection.

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

Parameters

schema
XmlSchema

The XmlSchema object.

Returns

true if there is a schema in the collection with the same targetNamespace; otherwise, false.

Remarks

Important

The XmlSchemaCollection class is obsolete in .NET Framework version 2.0 and has been replaced by the XmlSchemaSet class.

Applies to