处理URL和获取数据

huM*_*pty 7 .net c# vb.net winforms

我有一个URL返回数据的数组.例如,如果我有URL http://test.com?id=1,它将返回像3,5,6,7等等的值...

有没有什么办法可以处理这个URL并获得返回的值而无需去浏览器(处理应用程序中的url)?

谢谢

Dav*_*ish 26

真的很容易:

using System.Net;
Run Code Online (Sandbox Code Playgroud)

...

var response = new WebClient().DownloadString("http://test.com?id=1");
Run Code Online (Sandbox Code Playgroud)