Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
 IAsyncDisposable interface in example
  • Loading branch information
Tewr authored Mar 15, 2020
1 parent bab7de7 commit 9406f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ The code for views looks the same for both [client](src/Demo/Blazor.FileReader.W
foreach (var file in await fileReaderService.CreateReference(inputTypeFileElement).EnumerateFilesAsync())
{
// Read into buffer and act (uses less memory)
using (Stream stream = await file.OpenReadAsync()) {
await using (Stream stream = await file.OpenReadAsync()) {
// Do (async) stuff with stream...
await stream.ReadAsync(buffer, ...);
// The following will fail. Only async read is allowed.
Expand Down

0 comments on commit 9406f8b

Please sign in to comment.