---
title: "System::Collections::IComparer::Compare method"
url: "https://reference.aspose.com/tex/cpp/system.collections/icomparer/compare/"
product: "Aspose.TeX for C++"
description: "System::Collections::IComparer::Compare method. RTTI information in C++."
---

## IComparer::Compare method


RTTI information.

```cpp
virtual int System::Collections::IComparer::Compare(const SharedPtr<Object> &x, const SharedPtr<Object> &y) const =0
```


| Parameter | Type | Description |
| --- | --- | --- |
| x | const SharedPtr\<Object\>\& | First object to compare. |
| y | const SharedPtr\<Object\>\& | 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**.
## Remarks


[Comparison](../../../system/comparison/) function. 
## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [IComparer](../)
* Namespace [System::Collections](../../)
* Library [Aspose.TeX for C++](../../../)
