## MailQuery class

Represents the search criteria, that are used to match several message properties in the mailbox.

```csharp
public class MailQuery : IEquatable<MailQuery>, IXmlSerializable
```

## Constructors

| Name | Description |
| --- | --- |
| [MailQuery](mailquery/#constructor)(string) | Initializes a new instance of the `MailQuery` class. |
| [MailQuery](mailquery/#constructor_1)(string, string) | Initializes a new instance of the `MailQuery` class. |

## Properties

| Name | Description |
| --- | --- |
| [OrderByString](../../aspose.email.tools.search/mailquery/orderbystring/) { get; } | The sort query string. |

## Methods

| Name | Description |
| --- | --- |
| [Equals](../../aspose.email.tools.search/mailquery/equals/#equals)(MailQuery) | Indicates whether the current object is equal to another object of the same type. |
| override [Equals](../../aspose.email.tools.search/mailquery/equals/#equals_1)(object) | Determines whether the specified Object, is equal to this instance. |
| override [GetHashCode](../../aspose.email.tools.search/mailquery/gethashcode/)() | Returns a hash code for this instance. |
| [GetSchema](../../aspose.email.tools.search/mailquery/getschema/)() | This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class. |
| virtual [ReadXml](../../aspose.email.tools.search/mailquery/readxml/)(XmlReader) | Generates an object from its XML representation. |
| override [ToString](../../aspose.email.tools.search/mailquery/tostring/)() | Returns a String that represents this instance. |
| virtual [WriteXml](../../aspose.email.tools.search/mailquery/writexml/)(XmlWriter) | Converts an object into its XML representation. |

### See Also

* namespace [Aspose.Email.Tools.Search](../../aspose.email.tools.search/)
* assembly [Aspose.Email](../../)


