what is webclient & uses of webclient in .net
What is webclient & 开发者_运维百科uses of webclient?
WebClient is a class that allows you to send HTTP requests to a remote address from a .NET application. Here's an example in a console application:
class Program
{
static void Main()
{
using (var client = new WebClient())
{
string result = client.DownloadString("http://www.google.com");
Console.WriteLine(result);
}
}
}
From MSDN
Provides common methods for sending data to and receiving data from a resource identified by a URI.
精彩评论