0
特定のWebサイトのhtmlをコンソールに出力しようとしている次のスニペットがあります。Webclientを使用してコンソールにHTMLが表示されない
using System;
using System.Net;
namespace googleHTML
{
class Program
{
static void Main(string[] args)
{
WebClient client = new WebClient();
string htmlCode = client.DownloadString("http://www.google.com");
Console.ReadLine();
}
}
}
コンソールで実行すると、何も起こりません。
ありがとうございました。