F
Frank.cai
Unregistered / Unconfirmed
GUEST, unregistred user!
下边的代码中怎样写才能让STRLST1释放后,
strlst2中的内容认识仍然是STRLST1中赋过去的,别告诉我用循环ADD进去
procedure TForm1.Button1Click(Sender: TObject);
var strlst1,strlst2:Tstrings;
begin
strlst1:=Tstringlist.Create;
strlst1.Add('1');
strlst1.Add('2');
strlst2:=strlst1;
strlst1.Free;
showmessage(inttostr(strlst2.count));
end;
strlst2中的内容认识仍然是STRLST1中赋过去的,别告诉我用循环ADD进去
procedure TForm1.Button1Click(Sender: TObject);
var strlst1,strlst2:Tstrings;
begin
strlst1:=Tstringlist.Create;
strlst1.Add('1');
strlst1.Add('2');
strlst2:=strlst1;
strlst1.Free;
showmessage(inttostr(strlst2.count));
end;