C# WebClient BaseAddress

Description

WebClient BaseAddress Gets or sets the base URI for requests made by a WebClient.

Syntax

WebClient.BaseAddress has the following syntax.


public string BaseAddress { get; set; }

Example

The following code example downloads data from an Internet server and displays it on the console.


using System;//ww w .ja v a  2  s .  com
using System.Net;
using System.Net.Sockets;
using System.Text;

public class Example
{
    public static void Main()
    {
        WebClient myWebClient = new WebClient();

        myWebClient.BaseAddress = "http://yourServer.com";


    }
}




















Home »
  C# Tutorial »
    System.Net »




Cookie
Dns
IPAddress
IPEndPoint
IPHostEntry
WebClient