System.Generics.Defaults.IComparer
Delphi
IComparer<T> = interface
C++
template<typename T> __interface IComparer__1 : public System::IInterface
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
interface class |
public | System.Generics.Defaults.pas System.Generics.Defaults.hpp |
System.Generics.Defaults | System.Generics.Defaults |
Description
IComparer is the generic interface for comparing two values of the same type.
The IComparer interface is implemented by classes that work as comparers for two values of the same type. Generic collections require instances of classes that implement the IComparer interface, in order to provide support for custom data types.
Note: We recommend that the TComparer class is used as base for custom comparers instead of directly implementing the IComparer interface.
See Also
Code Examples