From 9406f8b23d8f7a5f989c9b4e57bfbc6f535da394 Mon Sep 17 00:00:00 2001 From: Tewr Date: Sun, 15 Mar 2020 21:05:24 +0100 Subject: [PATCH] Update README.md IAsyncDisposable interface in example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 53568d1..ce2bec7 100644 --- a/README.md +++ b/README.md @@ -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.