Im extremely noob in C#. Could you please help me?
I get the following errors:
- The name 'client' does not exist in the current context
- Identifier expected
- Expected class, delegate, enum, interface, or struct
Could you please write me the code that could work properly. I really appreciate your help in advance.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using (WebClient client = new WebClient ());
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
client.DownloadFile("http://yoursite.com/page.html", @"C:\localfile.html");
}
}
}