Einzelnen Beitrag anzeigen

daywalker9

Registriert seit: 1. Jan 2010
Ort: Leer
594 Beiträge
 
Delphi XE3 Professional
 
#2

AW: Files suchen und sortieren

  Alt 11. Jul 2011, 22:37
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));
Lars
  Mit Zitat antworten Zitat