Könnte man auch so machen:
Delphi-Quellcode:
lst:=TList<TSearchRec>.create;
lst.Sort(TComparer<TSearchRec>.Construct(function (const sr1,sr2 : TSearchRec):integer
begin
Result := 0;
if Result = 0 then
Result := -CompareValue(sr1.TimeStamp, sr2.TimeStamp);
if Result = 0 then
Result := CompareStr(sr1.Name, sr2.Name);
end));