Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   General Computer Support (http://www.velocityreviews.com/forums/f44-general-computer-support.html)
-   -   need help to add time interval in c# (http://www.velocityreviews.com/forums/t705327-need-help-to-add-time-interval-in-c.html)

ringku2k 11-15-2009 12:17 AM

need help to add time interval in c#
 
hi, im newbies in c# , i use the following code to to download a text file , when run the exe file it download once at a time , i want help for once i click to start the executable file , it will dowload that txt file after 2/3 minute time interval each , please help ..
code:
using System;
using System.Net;
using System.IO;
public class Download
{
private static void Main()
{
string remoteUri = "://w.com/st/qoute.txt"; //web address with file name
string localFileName = "qoute.txt";

WebClient client = new WebClient();
Console.WriteLine("Download der Datei " +
remoteUri + " nach " + Path.GetFullPath(localFileName));


// Download durchführen.
client.DownloadFile(remoteUri, localFileName);
Console.WriteLine("Download complete.");
Console.ReadLine();
}
}

erics44 11-26-2009 09:53 AM

I havent checked your code to see if a download would work like that but you can add a time interval by using a timer or a thread

I think if its a console application then you would probably best with a thread


All times are GMT. The time now is 04:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.