We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 708c0ae + d8e0d69 commit c6a9f60Copy full SHA for c6a9f60
articles/storage/blobs/storage-blob-append.md
@@ -51,8 +51,8 @@ static async Task AppendToBlob(
51
while (bytesLeft > 0)
52
{
53
int blockSize = (int)Math.Min(bytesLeft, maxBlockSize);
54
- int bytesRead = await logEntryStream.ReadAsync(buffer, 0, blockSize);
55
- using (MemoryStream memoryStream = new MemoryStream(buffer, 0, bytesRead))
+ int bytesRead = await logEntryStream.ReadAsync(buffer.AsMemory(0, blockSize));
+ await using (MemoryStream memoryStream = new MemoryStream(buffer, 0, bytesRead))
56
57
await appendBlobClient.AppendBlockAsync(memoryStream);
58
}
0 commit comments