我尝试使用此代码,但错误参数超出范围。如何解决这个问题?我在comport上尝试Generics.Collections,运行正常,但为什么我尝试netclient错误?谢谢你
uses
Generics.Collections
type
TArg<T> = reference to procedure(const Arg: T);
procedure TForm2.FormCreate(Sender: TObject);
begin
netkList := TList<TNetHTTPClient>.Create;
end;
procedure TForm2.Button1Click(Sender: TObject);
var
i: Integer;
strim: TStringStream;
respon: IHTTPResponse;
begin
for i := 1 to 25 do
begin
netkList[i].Asynchronous := False;
respon := netkList[i].Get('https://google.com/'+IntToStr(i), strim);
end;
end;