## XmlSchemaCollection::Contains(const SharedPtr\<XmlSchema\>\&) method


返回一个值，指示指定的 [XmlSchema](../../xmlschema/) 的 **targetNamespace** 是否在集合中。

```cpp
bool System::Xml::Schema::XmlSchemaCollection::Contains(const SharedPtr<XmlSchema> &schema)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| schema | const SharedPtr\<XmlSchema\>\& | [XmlSchema](../../xmlschema/) 对象。 |

### ReturnValue

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

## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XmlSchema](../../xmlschema/)
* Class [XmlSchemaCollection](../)
* Namespace [System::Xml::Schema](../../)
* Library [Aspose.Page for C++](../../../)
## XmlSchemaCollection::Contains(const String\&) method


返回一个值，指示具有指定命名空间的模式是否在集合中。

```cpp
bool System::Xml::Schema::XmlSchemaCollection::Contains(const String &ns)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| ns | const String\& | 与模式关联的命名空间 URI。对于 XML Schemas，通常是目标命名空间。 |

### ReturnValue

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

## 另见

* Class [String](../../../system/string/)
* Class [XmlSchemaCollection](../)
* Namespace [System::Xml::Schema](../../)
* Library [Aspose.Page for C++](../../../)
