Click here to Skip to main content
15,888,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
one of the functions of my program and to download a file in the Starup folder.

Searching on the net I found this solution:

C#
using (var client = new WebClient()) { client.DownloadFile("http://nviia.altervista.org/index.html", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "index.html");


but I get the error: CS1026 ) expected

You can help me?

What I have tried:

C#
using (var client = new WebClient()) { client.DownloadFile("http://nviia.altervista.org/index.html", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "index.html");
Posted
Updated 8-Dec-17 11:40am

The error is pretty self explanatory: you are missing a close bracket.
Specifically, you need a '(' before the ';' and a '}' after it.
 
Share this answer
 
I'm stupid. I did not notice. thank you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900