Skip to content

IComparable<T>

IComparable

IComparable is an interface for implementing objects that can be compared to find out whether one is greater than, less than or equal to the other one

Description

The IComparable interface defines a method to compare the current object to another object of the same type, on the basis of which the collection of these objects can be sorted.

Declaration

template<typename T>
   interface IComparable : public IEqualityComparable<T>

Header

#include <Generic\Interfaces\IComparable.mqh>

Inheritance Hierarchy

IEqualityComparable

IComparable

Direct descendants

: CKeyValuePair

Class Methods

MethodDescription
CompareCompares the current object with the specified value
Last updated on