如何使用网络浏览器获取网站文字?

yai*_*144 -3 c#

我试着做一个webbrowser,我得到了文本.但是得到文本的问题是将文件下载到我的计算机上.如何在不使用它的情况下获得此文本?谢谢

Bro*_*ass 5

你可以使用WebClient:

string output = string.Empty;
using (WebClient wc = new WebClient())
{
    output = wc.DownloadString("http://stackoverflow.com");
}
Run Code Online (Sandbox Code Playgroud)