これが私のコードです
try
{
for (int i = 0; i < RichTextbox2.Lines.Length; i++)
{
var length = urlwebapi.Lines.Length;
{
WebClient f = new WebClient();
dynamic read = f.DownloadString(urlwebapi.Lines[(i % length)] + RichTextbox2.Lines[i]);
JObject o = JObject.Parse(read);
}
}
}
catch (WebException e)
{
MessageBox.Show(e.Message);
}
MessageBox.Show("done");
サンプル URLwebapi
http://example1.com/api.php?ex=
http://example2.com/api.php?ex=
http://example3.com/api.php?ex=
http://example4.com/api.php?ex=
http://example5.com/api.php?ex=
このコードは、 urlwebapiで同時に1 つしか実行できません。コードが実行され、すぐに最大5つのurlwebapi(example1.comからexample5.comまで)を同時に実行する方法を教えてください