uw29859a.pp 301 B

12345678910111213141516171819202122
  1. unit uw29859a;
  2. {$mode delphi}
  3. interface
  4. type
  5. TMyRecord<T> = record
  6. public
  7. FValue: T;
  8. class operator Add(A,B: TMyRecord<T>): TMyRecord<T>;
  9. end;
  10. implementation
  11. class operator TMyRecord<T>.Add(A,B: TMyRecord<T>): TMyRecord<T>;
  12. begin
  13. Result.FValue := A.FValue + B.FValue;
  14. end;
  15. end.