We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagnostic ID: CA2022: Avoid inexact read with Stream.Read
Avoid inexact read with Stream.Read
NuGet Package: Microsoft.CodeAnalysis.NetAnalyzers
Version: 9.0.0
This rule raises an issue within .NET Framework 4.8, but the suggested method ReadExactly does not exist
ReadExactly
void M1(Stream stream, byte[] buffer) { // CA2022 violation. stream.Read(buffer, 0, buffer.Length); }
No warning at all
CA2022 violation reported
#7208 #69159
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Analyzer
Diagnostic ID: CA2022:
Avoid inexact read with Stream.Read
Analyzer source
NuGet Package: Microsoft.CodeAnalysis.NetAnalyzers
Version: 9.0.0
Describe the bug
This rule raises an issue within .NET Framework 4.8, but the suggested method
ReadExactly
does not existSteps To Reproduce
Expected behavior
No warning at all
Actual behavior
CA2022 violation reported
Additional context
#7208
#69159
The text was updated successfully, but these errors were encountered: