ImapUtilsNot Method
Creates IMAP search query of NOT type.

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public static string Not(
	string s


Type: SystemString
Search condition to be inverted.

Return Value

Type: String
The string containing the inverted search condition.
MailBeeInvalidArgumentException The specified string is a null reference (Nothing in Visual Basic) or an empty string.

This method allows you to produce the inverted query you can then pass to Search(Boolean, String, String) method. You can combine this method with other methods like AnyOf(String) to build complex queries.

For instance, if s is SINCE 1-Feb-1994, the return value is NOT SINCE 1-Feb-1994.

Note Note
Many IMAP search conditions already have native inverse versions. For instance, KEYWORD has UNKEYWORD counterpart. However, there is no harm to use NOT with such conditions (i.e. NOT KEYWORD has exacty the same effect as UNKEYWORD).
See Also