Button that downloads a file from a link to a website
I need to click a button and it will download a file from a website link
HttpClient

voidusing block not statement

React with ❌ to remove this embed.
•7/15/23, 1:51 AM
using statementusing blockrequestUrlasync voidvar httpClient = new HttpClient();
var responseStream = await httpClient.GetStreamAsync(requestUrl);
using var fileStream = new FileStream(localFilePath, FileMode.Create);
responseStream.CopyTo(fileStream);using var foo = new SomeDisposable();
// codeusing (var foo = new SomeDisposable())
{
// code
}