主页 > 编程资料 > Delphi >
发布时间:2015-09-22 作者:网络 阅读:128次

procedure TForm2.btn1Click(Sender: TObject);
var
  arr1, arr2: TBytes;
  len: Integer;
begin
  SetLength(arr1, 3);
  SetLength(arr2, 3);

  arr1[0] := 65;
  arr1[1] := 66;
  arr1[2] := 67;
  arr2[0] := 68;
  arr2[1] := 69;
  arr2[2] := 70;

  len := Length(arr1);
  SetLength(arr1, len + Length(arr2));
  CopyMemory(@arr1[len], arr2, Length(arr2));
  ShowMessage(StringOf(arr1)); { ABCDEF }
end;


关键字词: