1
for (int counter = 0; counter <= temparray.Length - 1; counter = counter + 1)
{
    if ((counter < temparray.Length + 2) && (temparray[counter] == "><img") &&    (temparray[counter + 1] == "id='header-img'"))
    {
        string j = temparray[counter + 2];

        int startIndex = j.IndexOf('"') + 1;

        int length = j.IndexOf('"', startIndex) - startIndex;

        string jj = (j.Substring(startIndex, length));

        client.DownloadFile(jj, @"C:\image.png");
    }
}

我得到了保存为名为 的字符串的图像的 URL jj,但是我试图将它保存到任何文件夹中但没有成功。

4

0 回答 0