Click here to Skip to main content
15,913,910 members
Home / Discussions / C#
   

C#

 
QuestionC# consoleapp [modified] Pin
mhm00118-Apr-07 21:51
mhm00118-Apr-07 21:51 
I am novice to C# programming.
I've made a little windowsforms C# app. This app connects to a website, downloads the *.csv files to a given dir.
But now i want to convert this app to a windowsconsole app, but the code i wrote is not working.
Can somebody help me?
Here is the code that is NOT working in the console app.

using System.Web;
using System;
using System.IO;
using System.Net;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;

namespace WTZI_GET
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class WebClient
{

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()

{

WebClient Client= new WebClient();
Client.DownloadFile("http://www.bouwcollege.nl/Exports/CIBG/GRIP_Doelgroepen.csv",@"c:\temp\Doelgroepen.csv");
Client.DownloadFile("http://www.bouwcollege.nl/Exports/CIBG/GRIP_Instellingen.csv",@"c:\temp\Instellingen.csv");
Client.DownloadFile("http://www.bouwcollege.nl/Exports/CIBG/GRIP_Toelatingen.csv",@"c:\temp\Toelatingen.csv");
Client.DownloadFile("http://www.bouwcollege.nl/Exports/CIBG/GRIP_Toelatingfuncties.csv",@"c:\temp\Toelatingfuncties.csv");
Client.DownloadFile("http://www.bouwcollege.nl/Exports/CIBG/GRIP_Toelatingspecificaties.csv",@"c:\temp\Toelatingspecificatie.csv");
Client.DownloadFile("http://www.bouwcollege.nl/Exports/CIBG/GRIP_Zorgfuncties.csv",@"c:\temp\Zorgfuncties.csv");
Client.DownloadFile("http://www.bouwcollege.nl/Exports/CIBG/GRIP_Zorgkantoren.csv",@"c:\temp\Zorgkantoren.csv");


}

}
}


-- modified at 4:50 Thursday 19th April, 2007
AnswerRe: C# consoleapp Pin
Guffa18-Apr-07 22:15
Guffa18-Apr-07 22:15 
AnswerRe: C# consoleapp Pin
Colin Angus Mackay18-Apr-07 22:21
Colin Angus Mackay18-Apr-07 22:21 
AnswerRe: C# consoleapp Pin
Svetlin Panayotov18-Apr-07 22:30
Svetlin Panayotov18-Apr-07 22:30 
AnswerRe: C# consoleapp Pin
Guffa18-Apr-07 23:10
Guffa18-Apr-07 23:10 
AnswerRe: C# consoleapp Pin
mhm00118-Apr-07 23:26
mhm00118-Apr-07 23:26 
GeneralRe: C# consoleapp Pin
Guffa19-Apr-07 11:42
Guffa19-Apr-07 11:42 
QuestionDateTimePicker Pin
cocoonwls18-Apr-07 21:50
cocoonwls18-Apr-07 21:50 
AnswerRe: DateTimePicker Pin
samerh18-Apr-07 22:13
samerh18-Apr-07 22:13 
AnswerRe: DateTimePicker Pin
phantanagu18-Apr-07 22:34
phantanagu18-Apr-07 22:34 
AnswerRe: DateTimePicker Pin
Svetlin Panayotov18-Apr-07 22:34
Svetlin Panayotov18-Apr-07 22:34 
AnswerRe: DateTimePicker Pin
cocoonwls19-Apr-07 0:00
cocoonwls19-Apr-07 0:00 
QuestionClass Diagram relation issue [modified] Pin
Saira Tanwir18-Apr-07 21:31
Saira Tanwir18-Apr-07 21:31 
AnswerRe: Class Diagram relation issue Pin
Pete O'Hanlon18-Apr-07 22:25
mvePete O'Hanlon18-Apr-07 22:25 
AnswerRe: Class Diagram relation issue Pin
Saira Tanwir18-Apr-07 22:27
Saira Tanwir18-Apr-07 22:27 
GeneralRe: Class Diagram relation issue Pin
Pete O'Hanlon19-Apr-07 2:06
mvePete O'Hanlon19-Apr-07 2:06 
AnswerRe: Class Diagram relation issue Pin
Saira Tanwir19-Apr-07 2:36
Saira Tanwir19-Apr-07 2:36 
QuestionDataGrid Pin
nuraprakash18-Apr-07 21:24
nuraprakash18-Apr-07 21:24 
AnswerRe: DataGrid Pin
baerten18-Apr-07 21:33
baerten18-Apr-07 21:33 
Questioncopying row in datagridview Pin
phantanagu18-Apr-07 21:10
phantanagu18-Apr-07 21:10 
AnswerRe: copying row in datagridview Pin
Sathesh Sakthivel18-Apr-07 21:19
Sathesh Sakthivel18-Apr-07 21:19 
AnswerRe: copying row in datagridview [modified] Pin
phantanagu18-Apr-07 22:08
phantanagu18-Apr-07 22:08 
QuestionSQLCommand parameters to prevent SQL injections Pin
GermanDM18-Apr-07 21:07
GermanDM18-Apr-07 21:07 
AnswerRe: SQLCommand parameters to prevent SQL injections Pin
Stefan Troschuetz18-Apr-07 21:11
Stefan Troschuetz18-Apr-07 21:11 
AnswerRe: DataGridView validation Pin
Sathesh Sakthivel18-Apr-07 21:14
Sathesh Sakthivel18-Apr-07 21:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.