---
title: "Aspose::Email::Tools::Search::StringComparisonField::NotContains method"
url: "https://reference.aspose.com/email/cpp/aspose.email.tools.search/stringcomparisonfield/notcontains/"
product: "Aspose.Email for C++"
description: "Indicates that field in message must not contain the specified value."
---


## NotContains (1 of 2) {#notcontains_1}

Indicates that field in message must not contain the specified value.

**Returns:** MailQuery that represents search query (one searching criterion).

```cpp
NotContains(System::String value)
```

| Parameter | Description |
| --- | --- |
| value | The value. |

---

## NotContains (2 of 2) {#notcontains_2}

Indicates that field in message must not contain the specified value.

**Returns:** MailQuery that represents search query (one searching criterion).

```cpp
NotContains(System::String value, bool ignoreCase)
```

| Parameter | Description |
| --- | --- |
| value | The value. |
| ignoreCase | true to ignore case during the comparison; otherwise, false. |

