- 
                Notifications
    
You must be signed in to change notification settings  - Fork 6.1k
 
Closed
Description
Hi
In the example, the following line  isn't correct, if you want to show how FileStream is used:
String decodedString = utf8.GetString(encodedBytes);
It should be:
String decodedString = utf8.GetString(bytes);
because 'bytes' has been read from FileStream.
Using 'encodedBytes' you would simply proof that utf8.GetString is the reverse operation of utf8.GetBytes.
Nevertheless it's a very good example. Thank you
Andreas
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 7286f52a-0d12-166d-85ea-aa273cfab1b5
 - Version Independent ID: 20e60442-25e0-53c2-bd44-42d8218a4e64
 - Content: UTF8Encoding Class (System.Text)
 - Content Source: xml/System.Text/UTF8Encoding.xml
 - Product: dotnet-api
 - GitHub Login: @rpetrusha
 - Microsoft Alias: ronpet
 
Metadata
Metadata
Assignees
Labels
No labels