1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Net; 5 using System.Text; 6 using System.Threading.Tasks; 7 8 namespace ConsoleApplication7 9 { 10 class Program 11 { 12 static void Main(string[] args) 13 { 14 WebClient webC = new WebClient(); 15 string webAdress = @""; 16 string webContent = webC.DownloadString(webAdress); 17 Console.WriteLine(webContent); 18 Console.ReadKey(); 19 } 20 } 21 }
2 效果
乱码了。。。为什么呢?编码格式!
我们查看博客园首页的编码格式