Code
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;
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/sunstone/archive/2009/11/13/4808791.aspx