logo
  • 教程列表
  • SO官方文档
  • 泛型
    • 通过通用 TArray.SortT 对动态数组进行排序
    • 简单使用 TListT
    • 从 TListT 下降使其具体化
    • 对 TListT 进行排序
  1. StackOverflow 文档
  2. Embarcadero Delphi 教程
  3. 泛型
  4. 从 TListT 下降使其具体化

从 TListT 下降使其具体化

Created: November-22, 2018

type
  TIntegerList = class(TList<Integer>)
  public
    function Sum: Integer;
  end;

...

function TIntegerList.Sum: Integer;
var
  Item: Integer;
begin
  Result := 0;
  for Item in Self do
     Result := Result + Item;
end;
  • 对 TListT 进行排序
  • 简单使用 TListT

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明