Skip to content

Instantly share code, notes, and snippets.

View barwis's full-sized avatar

Bartosz Wisniewski barwis

  • United Kingdom
View GitHub Profile
@barwis
barwis / DownloadFile.cs
Last active August 29, 2015 14:27 — forked from nboubakr/DownloadFile.cs
Simple function in C# to download a file from the internet, supports to resume the download.
public static void downloadFile(string sourceURL, string destinationPath)
{
long fileSize = 0;
int bufferSize = 1024;
bufferSize *= 1000;
long existLen = 0;
System.IO.FileStream saveFileStream;
if (System.IO.File.Exists(destinationPath))
{