You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

melium's avatar
melium
Helpful | Level 6
8 years ago

task async convert to void

does anyone know a different method not using task async i want to use void public async Task Download(string remoteFilePath, string localFilePath) { DropboxClient client2 = new...
  • melium's avatar
    melium
    8 years ago

    i got it working

    public async void DownloadDB()
            {
                try
                {
                    DropboxClient client2 = new DropboxClient("token");
                    string file = "/data1.db3";
                    string folder = @"/data/data/AndroidMaster.AndroidMaster/files/data1.db3";
                    using (var response = await client2.Files.DownloadAsync(file))
                    {
                        using (var fileStream = File.Create(folder))
                        {
                            (await response.GetContentAsStreamAsync()).CopyTo(fileStream);
                        }
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                }
            }