## IComparer::Compare method


[Comparison](../../../system/comparison/) function.

```cpp
virtual int System::Collections::Generic::IComparer<T>::Compare(args_type x, args_type y) const =0
```


| Parameter | Type | Description |
| --- | --- | --- |
| x | args_type | First object to compare. |
| y | args_type | Second object to compare. |

### ReturnValue

Negative value if **x** is less than **y**; zero if they are equal; positive value if **x** is greater than **y**.

## See Also

* Typedef [args_type](../args_type/)
* Class [IComparer](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PUB for C++](../../../)
