zoukankan      html  css  js  c++  java
  • System 这四个单元多用用(近期)

     参考:https://www.cnblogs.com/xumenger/p/4687493.html

    System.Classes.pas:

    TList、(TStrings)TStringList

    System.Contnrs.pas:

    TObjectList、

    TComponentList、TClassList、TOrderedList、

    TStack、TObjectStack、

    TQueue、TObjectQueue、

    TCustomBucketList

    System.Generics.Collections.pas:

      TList<T>

      TObjectList<T>

      TDictionary<TKey, TValue>

      TStack<T>

      TQueue<T>

    System.Diagnostics.pas:

    procedure TfrmRandomWordSearch.FindGoodWord(const wordTest: TWordCheckDelegate);
    var
      word: string;
      isWordOK: boolean;
      time: TStopwatch;
    begin
      time := TStopwatch.StartNew;
      repeat
        word := GenerateWord;
        isWordOK := wordTest(word);
      until isWordOK or (time.ElapsedMilliseconds > 10000);
      if isWordOK then
        lbWords.ItemIndex := lbWords.Items.Add(Format('%s (%d ms)', [word, time.ElapsedMilliseconds]))
      else
        lbWords.ItemIndex := lbWords.Items.Add('timeout');
    end;
    

      

  • 相关阅读:
    寒假学习第九天
    寒假学习第八天
    寒假学习第七天
    寒假学习第六天
    寒假学习第五天
    寒假学习第四天
    寒假学习第三天
    寒假学习第二天
    寒假学习第一天
    阅读笔记
  • 原文地址:https://www.cnblogs.com/BSor/p/9371034.html
Copyright © 2011-2022 走看看