Embarcadero Delphi Generics Sort a TList


Example

var List: TList<TDateTime>;

...

List.Sort(
  TComparer<TDateTime>.Construct(
    function(const A, B: TDateTime): Integer
    begin
      Result := CompareDateTime(A, B);
    end
  )
);