I'm working on a YouTube Downloader, which gets sizes of all qualities available but usually that takes a very long time and sometimes it just goes like a lightning !
I wrote this Function and it's pretty good [ only sometimes as I said before ] !
Uri url = new Uri("http://example.com/document.docx");
System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
response.Close();
// iSize will handle the size of the file in bytes
Int64 iSize = response.ContentLength;
.
So, Is there a faster way to do this ? ( Put on your mind that the files which will be measured are more than eight files ) .
.
In advance, thank you so much ;