Suggest using streamreader instead of iterating over the stream
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- documentation
Research direction
Open docs/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams.md and locate the recommended section. Update it to suggest using StreamReader with CryptoStream as shown in the issue instead of manually iterating over the stream. Confirm the example and surrounding guidance accurately describe the recommended approach.
Written by the indexing model from the issue text.
Description
In the recommended section, you should suggest the use of StreamReader instead of manually iterating over the Stream :
using (var plainTextReader = new StreamReader(cryptoStream))
{
return plainTextReader.ReadToEnd();
}
reference : https://stackoverflow.com/questions/69911084/problem-updating-to-net-6-encrypting-string
Thanks !
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 8ad66e79-695d-65b2-c85a-b857283e9aee
- Version Independent ID: febfa9c4-1fb2-0bc6-d23a-ed2e9425aeed
- Content: Breaking change: Partial and zero-byte reads in DeflateStream, GZipStream, and CryptoStream - .NET
- Content Source: docs/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams.md
- Product: dotnet-fundamentals
- GitHub Login: @gewarren
- Microsoft Alias: gewarren
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 15h 30m
- Merged PRs (30d)
- 374
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/docs
-
:watch: Not Triaged dotnet-framework/svc install-deployment/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
:watch: Not Triaged
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
-
:watch: Not Triaged dotnet-fundamentals/svc
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
dotnet-fundamentals/svc waiting-on-feedback
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
dotnet-csharp/svc lang-reference/subsvc
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100