ugeneric3.pp 218 B

1234567891011121314151617181920
  1. unit ugeneric3;
  2. interface
  3. {$mode objfpc}
  4. type
  5. generic TList<_T>=class(TObject)
  6. data : _T;
  7. procedure Add(item: _T);
  8. end;
  9. implementation
  10. procedure TList.Add(item: _T);
  11. begin
  12. data:=item;
  13. end;
  14. end.