Dropbox API Downloading a file using the Dropbox .NET library


Example

This uses the Dropbox .NET SDK to download a file from the Dropbox API at the remote path /Homework/math/Prime_Numbers.txt to the local file Prime_Numbers.txt:

using (var response = await client.Files.DownloadAsync("/Homework/math/Prime_Numbers.txt"))
{
    using (var fileStream = File.Create("Prime_Numbers.txt"))
    {
        (await response.GetContentAsStreamAsync()).CopyTo(fileStream);
    }

}