Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method.
Methods | |
| virtual int32 | compare_to (const type_t &obj) const noexcept=0 |
| Compares the current instance with another object of the same type. More... | |
|
pure virtualnoexcept |
Compares the current instance with another object of the same type.
| obj | An object to compare with this instance. |
| Value | Condition |
|---|---|
| Less than zero | This instance is less than obj. |
| Zero | This instance is equal to obj. |
| Greater than zero | This instance is greater than obj. |
Implemented in xtd::date_time, xtd::ustring, xtd::time_span, xtd::version, xtd::guid, xtd::box< type_t >, and xtd::enum_object< enum_t >.