Click here to Skip to main content
16,014,290 members

Comments by vbtoan (Top 2 by date)

vbtoan 5-Feb-13 22:44pm View    
Console.Title = "A simple speedtest app";

// the URL to download a file from
Uri URL = new Uri("http://vodcdn.megatv.vn/vod/ducuong/Skyfall.2012.HD.flv");
WebClient wc = new WebClient();

Console.WriteLine("Welcome to this simple speedtest,\nwhich will test your download rate.");
Console.WriteLine("Press any key to begin.");
Console.ReadKey();

Console.WriteLine("\nDownloading file: ...");
Console.WriteLine("From http://vodcdn.megatv.vn/vod/ducuong/Skyfall.2012.HD.flv");
Console.WriteLine("Note: This file will automatically be deleted after the test.");

wc.DownloadFile(URL, @"string url = HttpContext.Current.Request.Url.AbsoluteUri;");
I use this code to download from the net.I want to measure the size of file to be downloaded in 1 second and display it you can help me
vbtoan 5-Feb-13 22:44pm View    
helo your solusion . long side = "fi".Length
I did not quite understand the use fi.Length you can specify more than one bit is not
Console.Title = "A simple speedtest app";

// the URL to download a file from
Uri URL = new Uri("http://vodcdn.megatv.vn/vod/ducuong/Skyfall.2012.HD.flv");
WebClient wc = new WebClient();

Console.WriteLine("Welcome to this simple speedtest,\nwhich will test your download rate.");
Console.WriteLine("Press any key to begin.");
Console.ReadKey();

Console.WriteLine("\nDownloading file: ...");
Console.WriteLine("From http://vodcdn.megatv.vn/vod/ducuong/Skyfall.2012.HD.flv");
Console.WriteLine("Note: This file will automatically be deleted after the test.");

wc.DownloadFile(URL, @"string url = HttpContext.Current.Request.Url.AbsoluteUri;");
I use this code to download from the net.I want to measure the size of file to be downloaded in 1 second and display it you can help me