Prefer Memory<T> overloads for Stream.Read/WriteAsync #33790
Labels
api-approved
API was approved in API review, it can be implemented
area-System.IO
code-analyzer
Marks an issue that suggests a Roslyn analyzer
code-fixer
Marks an issue that suggests a Roslyn code fixer
Milestone
Find places where
await stream.Read/WriteAsync(array, offset, length, ...)
are used and recommend they be replaced by calls to the overloads that take{ReadOnly}Memory<byte>
, to benefit from the return type beingValueTask<int>
.Category: Performance
The text was updated successfully, but these errors were encountered: