{
try {
WebClient client = new WebClient()
client.Credentials = CredentialCache.DefaultCredentials
Byte[] pageData = client.DownloadData("http://www.contoso.com")
string pageHtml = Encoding.ASCII.GetString(pageData)
Console.WriteLine(pageHtml)
} catch (WebException webEx) {
Console.Write(webEx.ToString())
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)