Skip to content

Suggest using streamreader instead of iterating over the stream #33488

Description

@Echtelion

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnet-fundamentals/svchelp wantedGood for community contributors to help [up-for-grabs]in-prThis issue will be closed (fixed) by an active pull request.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions